Reverse Functionality of Interactive Legends

Hello all,

I’m trying to replicate the way interacting with graphs works in other programs that I’m used to.

In Bokeh (and plotly… and highcharts… and mpld3…), when you click on an item in the legend, that item is hidden or muted.

Is there a way to make it so the opposite happens, i.e. all other items except the one clicked on get hidden or muted? I’ve heard there isn’t plumbing set up to do callbacks on the legend object, but is this sort of thing possible by building other GUI elements to create a mock legend?

I have some python experience, but I don’t know very much about web development (HTML, JS). I’m willing to learn, but there is a lot of jargon I’m still not familiar with.

Thanks

Hi,

There is not currently, but there is a similar open issue about having the legend highlight the corresponding glyph on hover, which seems similar. Please chime in with any thoughts

  [FEATURE] Interactive Legend: More mode options · Issue #8841 · bokeh/bokeh · GitHub

Otherwise, for now, yes you could certainly draw a "legend" by hand, explicitly using additional glyphs and labels, and positioning them manually.

Thanks,

Bryan

···

On Apr 26, 2019, at 8:15 PM, [email protected] wrote:

Hello all,

I'm trying to replicate the way interacting with graphs works in other programs that I'm used to.

In Bokeh (and plotly.. and highcharts... and mpld3...), when you click on an item in the legend, that item is hidden or muted.

Is there a way to make it so the opposite happens, i.e. all other items except the one clicked on get hidden or muted? I've heard there isn't plumbing set up to do callbacks on the legend object, but is this sort of thing possible by building other GUI elements to create a mock legend?

I have some python experience, but I don't know very much about web development (HTML, JS). I'm willing to learn, but there is a lot of jargon I'm still not familiar with.

Thanks

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/43ebb55f-0407-4789-9e5f-c8f3f7750162%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.