☰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

Update HoverTool renderers?

Community Support
Patrick_Wright
Patrick_Wright

On widget action (e.g. on_change() for a RadioGroup), I set certain glyph renderers in my plot to visible=False. This will remove the renderer my HoverTool was assigned to, and I would like to also update the glyph renderer for the HoverTool to a different renderer that is still visible. Is this possible?

For example, I add the HoverTool when first building my figure (f) as:

  f.add_tools(HoverTool(
      renderers=[GlyphRenderer_1],
      tooltips=tooltips,
      line_policy='nearest',
      mode='vline'
      )
  )

It would be great if in my callback for the RadioGroup action I could grab hold of the HoverTool within the figure object and update the renderers.

⌁   Link to post
Bryan
Bryan

hold of the HoverTool within the figure object

You can certainly do that with plot.select(...) but personally I would just give the hover tool a name (i.e. assign it to a variable), and they you can just refer to it directly in the callback.

⌁   Link to post

End of archived discussion · Replies are disabled