Is it possible to manually trigger a hover tool within bokeh? A minimal example is below. I’d like the application to show the tooltip (as if hovering over the data point with the mouse) when the corresponding row in the DataTable is selected. The use case is to display additional information in the tooltip that is not in the table. Thank you!
There’s not any especially good way to trigger HoverTool tooltips programmatically at the present time. [1]. Ostensibly this could be accomplished with the recently added Tooltip support, since they are supposed to be attachable to arbitrary UI elements. But I am not aware of a good example of adding them to a plot. I’d suggest opening a GitHub development discussion specifically about that topic, as I can ping some other folks more involved in the development of this feature more easily there.
I won’t say it’s impossible, since a CustomJS callback could in principle do much of what the HoverTool itself does, but all I can advise in that direction is to go study the HoverTool (TypeScript) source code for inspiration. ↩︎
HI @russellburdt sure if you don’t need some of the features specific to tooltips (e.g. little arrow “anchors”, etc) then text renderers are definitely an options. I might suggest you also look at the text glyph, it recently had many of the features of labels added to it, for example:
For historical reasons, Bokeh has an over-abundance of different, overlapping text renderers, and over time we hope to consolidate down to maybe just the text glyph (we’d like to get to a point where annotation is “something you do with standard glyphs” instead of “a set of different special objects”)