Bokeh: Force onclick event to a Legend via JS callback - bokeh

I'm using Bokeh 2.3.0. I have several items in my Legend that are all muted on load. I provided a button that I want to use for toggling the visibility of all legend items.
Here's what I have now:
Here's my JS callback:
I believe I'm close enough to achieve it but setting the muted property doesn't work and I don't know how to send an onclick event. Hope someone can help or confirm that this is not supported in BokehJS.

Related

Vis JS :: Scroll Network Graph when Using 'dragging' Event

I've got a network graph and I need to use the dragging event.
This overrides the scroll by dragging and the ability to drag nodes that I also need to preserve.
Is there a way to access the default callback and call it? What other solution would you suggest?
I tried to use the dragging event and everything worked ok in my case.
You can also try to use the dragStart or the dragEnd event and see if those fits your case.
my 2 cents

Google Maps resize: maptype control button css style disappears

i have a map on my page with maptype control button. When initializing the map i add a css style(highlighting the current active map type, like "Map" or "Satellite")to the button.
When resized, the map kind of reloads and the button css disappears, so i have to wait for the resize to end and reapply css style on the button.
In the end it just looks weird, because the map loads and the button has default color, after 2 seconds (i use settimeout) the button is applied the css again. How can this be done so the button gets the css before map loads and also keep that css.
Should i use a callback here and would that make a difference?
As mentioned in Custom Controls, few rules are necessary to create your own custom control. The following are the guidelines which also acts as best practice:
Define appropriate CSS for the control element(s) to display.
Handle interaction with the user or the map through event handlers for either map property changes or user events (for example, click events).
Create a element to hold the control and add this element to the Map's controls property.
To know more about these concerns, please go through the discussion and sample codes in the given documentation primarily in the following:
Drawing Custom Controls
Handling Events from Custom Controls
Positioning Custom Controls
A Custom Control Example
Adding State to Controls

Displaying a jQueryUI tooltip based on condition

By default (more precisely, it's designed so that) a jQueryUI tooltip appears on mouseover and focusin events. What I need is the same functionality, but not on mouseover, rather upon a certain condition. It's really cool the way tooltip appears with different possible animations. But it'd be wonderful if I could tweak it to pop up whenever I call it. Do you think it's possible with some minor adjustments to the source or would it need lots of coding?
From looking at the jQuery UI API page, you could use the open and close methods to show and hide the tooltip whenever you need to (copy/pasted from jQuery UI Tooltip API documentation):
$( ".selector" ).tooltip( "open" ); will show the tooltip. To hide it again, just use $( ".selector" ).tooltip( "close" );

using jquery accordion hides most of googleMap

I have an accordion widget with 2 tabs. Each of them has a GoogleMap. The first map get properly displayed but when I open the second one, only a portion of the map appears in the viewport.
If I remove the widget by commenting out the following code, both maps are properly displayed.
$("#accordion").accordion({
header: "h3", fillSpace: true, event: "mouseover"
});
How can I use this widget while still having both map displayed properly?
Check on http://forums.asp.net/t/1780781.aspx/1?using+jquery+accordion+hides+most+of+googleMap to get the code as it is quite a job to publish it on this site.
thanks a lot!
You'll need to observe the change-event of the accordion and trigger the resize-event for the map when it fires.
Example: http://jsfiddle.net/doktormolle/VqzPE/
The example stores the map inside the data of the accordion-content, so you may easy access it when change fires.

Does Flex fire an event after a chart is rendered in UI?

I am looking for an event which is fired (if any) after a chart is rendered (visible in UI) in Flash, we are using Flex SDK 3.0. We have to capture the screenshot after the chart is rendered, current implementation adds a huge delay in update_complete event callback, this is slowing down the whole job of generating images.
I tried to use EXIT_FRAME event, but this doesn't seem to serve the purpose. Any help to resolve this issue is highly appreciated.
Regards,
Dan
Adobe use this event : mx.events.FlexEvent.TRANSFORM_CHANGE
But if you want to use it, you are obligate to inherit from Chart Component classes. Take a look at DataTransform Class.
http://help.adobe.com/es_ES/FlashPlatform/reference/actionscript/3/mx/charts/chartClasses/DataTransform.html
I suggest you to look at the DisplayObject liveDoc, where there are several types of events. Some are fired before the rendering (Event.RENDER), some are fired after specific operation (ResizeEvent, for instance). But if you really want to know when you chart has been rendered, why don't you watch for the validation methods (updateDisplayList(), commitProperties()) by overriding them in a child class and fire a custom event in there ?

Resources