Possible to hide tooltips for muted lines?

I’ve got a figure with several lines going nicely thanks to some help from @p-himik, and I’ve got the legend click policy = ‘mute’ and have added some tooltips.

The tooltips still show when a line is muted, and I’m hoping to figure out if this can be disabled. As muted attributes need to be specified I’m thinking perhaps there’s some setting I can’t find in the documentation.

Is there anything I can do to disable tooltips for muted lines?

No, not directly. There are 3 options that I can think of:

  • Hide instead of muting
  • Modify the list of renderers of the hover tools whenever you mute a glyph
  • Create a custom HoverTool that ignores muted glyphs

This seems worth opening a GH feature request issue for. Should be fairly simple to implement.

1 Like

Awesome! I don’t really know what I’m doing but is there anything I can do to help?

@p-himik any suggestions on how to go about making such a custom HoverTool?

Created Add ignore_muted flag to HoverTool by p-himik · Pull Request #9873 · bokeh/bokeh · GitHub
You can check its code out to see how you can extend the existing HoverTool if you need that functionality before the changes make it to a Bokeh release.