I use vega-react and I would like to know the easiest way not to display the "Actions" button on the chart.
if I declare all actions to be false it will not display any actions but the button will still be present.
<Vega spec={spec as VisualizationSpec} data={barData} actions={{
export: false,
source: false,
compiled: false,
editor: false,
}} />
As mentioned in the vega-embed documentation, the actions setting can either be an object or a Boolean, and relevant to your question:
If the value is true, all action links will be shown and none if the value is false
So I believe what you want is actions=false
Yes, set actions: false, however what I didnt realise is that this has to be in the third parameter of the vegaEmbed function
vegaEmbed(
'#vegaChart_traders',
yourVlSpec,
{renderer: "svg", actions: false}
);
rather than in the yourVlSpec object
hope that helps someone :)
Related
Is anyone even use PhotoSwipe before ?
https://github.com/dimsemenov/PhotoSwipe
I stuck at image left and right (back and next)
like this image.
I don't want the other icon. I want to know how to fix this.
I already try to disable image inside css but it's still not work
Please help.
You can use the following options available to show/hide photoswipe buttons/elements.
for more info read docs here
var options = {
history: false,
focus: false,
closeEl: true,
captionEl: true,
fullscreenEl: true,
zoomEl: true,
shareEl: true,
counterEl: true,
arrowEl: true,
preloaderEl: true
};
I have this coffee script
#open_login_dialog = () ->
opt = {
autoOpen: false,
modal: true,
width: 'auto',
focus: function(e) ->
$(this).dialog('option', 'width', $("#loginBox").width())
}
Rails is reporting the cryptic error, “SyntaxError: [stdin]:184:12: reserved word 'function’”. It doesn’t tell me a line, but when I comment out the “focus:function” part everything works, which leads me to believe that’s the culprit. How do I write the above so that it plays nicely with coffee script?
As per #muistooshort's comment, You need to use coffeescript function syntax, which replaces function(a,b,c) with (a,b,c) ->
Secondly, you need to continue using : for assignment inside an object.
I would also suggest brushing up a little on coffeescript. This is my favourite resource on the language. A linter would also help to catch these basic syntax errors.
Your code can be further cleaned up:
#open_login_dialog = ->
opt =
autoOpen: false
modal: true
width: 'auto'
focus: ->
$(this).dialog 'option', 'width', $('#loginBox').width()
Explanation
If you don't expect any parameters, you can leave out the () from the function definition and just use the arrow ->.
You don't need {} brackets to define an object
When defining an object over multiple lines, there is no need for trailing commas
You aren't using the eventObject e in the focus listener, so that can be left out too.
Parenthesis are optional when calling functions and passing them parameters.
i tried the below code it's not working
<paper-toast class$="center cursor-d horizontal justified layout" duration="4000" id="toast" no-cancel-on-outside-click="false" on-iron-announce="toast_open" on-transitionend="transition">
<div class="cursor-p self-start" hidden="[[!undo]]" on-click="clear_undo">UNDO</div>
</paper-toast>
but
document.querySelector("#toast").noCancelOnOutsideClick = false
is working when i try it from console
what is correct html syntax to assign false ? pls help
This is actually a bit tricky. noCancelOnOutsideClick is a Boolean attribute. Normally, any presence in the HTML will set it to true, inlcluding no-cancel-on-outside-click="false".
If you want to set it to false you would just leave it away in your HTML.
So to set the value to true, you would do this:
<paper-toast no-cancel-on-outside-click>
And for false this:
<paper-toast>
However the attribute defaults to true, so the above does not work.
You could either set the attribute in the ready function like you do now in the console or use data-binding.
<paper-toast no-cancel-on-outside-click$=[[myFalseValue]]>
There's an interesting discussion on Boolean attributes in Polymer on Github.
In Sublime Text 3 Vintage Mode, the keyboard shortcut "}" performs the following command:
{
"keys": ["}"],
"command": "set_motion",
"args": {
"motion": "move",
"motion_args": {
"by": "stops",
"empty_line": true,
"extend": true,
"forward": true,
"separators": "",
"word_begin": false
}
}
}
I can't find good documentation for set_motion and I'm not sure where to start to implement this from scratch.
How do I change the behavior so that instead of moving to the next empty line, it moves to the next line with only whitespace?
Thanks!
Can't really help with the set_motion command, but doing it yourself via a plugin shouldn't be to bad. First off, here is a link to the ST3 API docs. You will be creating a sublime_plugin.TextCommand. Of particular interest are view#sel, view#line, and view#substr.
view#sel will get you the position of the cursor(s).
view#line with a point passed in (initially retrieved from view#sel) will create give you a region of the entire line.
view#substr takes the region (result from view#line) and returns the string of the characters in that line. You can use a regular expression to see if that line contains only white space, and place the cursor appropriately. If the line does not meet the requirement, you can increase the second point in the region to move to the next line.
Hope that helps getting you moving in the right direction.
Here is a comment from the softwares author on the options availability for “by”: “stops”
https://forum.sublimetext.com/t/restoring-st2-cursor-move-by-word-behaviour-in-st3-on-os-x/14035
If you need more control, then using the move command with “by”: “stops” should allow more configurability. When using stops, you need to tell the command which logical units to stop on. The options are:
"word_begin": false,
"word_end": false,
"punct_begin": false,
"punct_end": false,
"sub_word_begin": false,
"sub_word_end": false,
"line_begin": false,
"line_end": false,
"empty_line": false,
i work with jqgrid for listings only also i don't use jqgrid forms
i need to call external forms (example: update.cgi?id=123) to make modifications on the database.
how can i make that ?
thanks a lot
Look at the documentation for the 'editurl' parameter.
e.g. editurl: "/GridDemo/GridSave",
Mark your columns as editable, add the appropriate options to the page control too, e.g.
jQuery("#list2").jqGrid('navGrid', '#pager2',
{
edit: { height: 280, reloadAfterSubmit: false },
add: { height: 280, reloadAfterSubmit: false },
del: { reloadAfterSubmit: false }, search: false
});