☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Legend select one/ select all

Community Support
mpm
mpm

I find the click policy ‘hide’ to be very useful but in cases where many series are displayed sometimes I want to zero in on one series. It would be great to have longclick (or other event) hide everything but the series I click. Alternatively, a clear all and select
all button in the legend would work.

There doesn’t seem to be a way to do this in bokeh currently. Would anyone else find this functionality useful or have thoughts on it?

Thank you

⌁   Link to post
Sebastien_Roche
Sebastien_Roche

I don’t think it can be done inside the legend itself, but you can easily do this with button calbacks.
One way to make it easy with the legend would be to add a callback attribute to the interactive legend (or be able to pass a callback to click_policy) to allow users to customize interactions

···

Le mercredi 1 novembre 2017 15:55:23 UTC-4, mpm a écrit :

I find the click policy ‘hide’ to be very useful but in cases where many series are displayed sometimes I want to zero in on one series. It would be great to have longclick (or other event) hide everything but the series I click. Alternatively, a clear all and select
all button in the legend would work.

There doesn’t seem to be a way to do this in bokeh currently. Would anyone else find this functionality useful or have thoughts on it?

Thank you

⌁   Link to post

End of archived discussion · Replies are disabled