Hover with Arrow

What is the correct method assigning hover tooltips to arrows?
The list of variables is:
print(data['variables'])
[‘X100m’, ‘Long.jump’, ‘Shot.put’, ‘High.jump’, ‘X400m’, ‘X110m.hurdle’, ‘Discus’, ‘Pole.vault’, ‘Javeline’, ‘X1500m’]

arrow = Arrow(end=VeeHead(size=8),
             x_start=0, y_start=0, x_end='x_data', y_end='y_data', source=source)

vect = p_circ.add_layout(arrow)

hover_circle = HoverTool(
    tooltips=[('variable', '@variables')],
    mode='mouse')
hover_circle.renderers=[vect]
p_circ.add_tools(hover_circle)


print(data['variables'])

show(p_circ)

bokeh_plot(7)

Tools only act on glyphs, and Arrow is not a glyph but an annotation.

Ok. Any possibilities, hacks ?

You can either plot the arrows completely manually or just plot some transparent glyphs on top of the annotations. The easiest is probably to plot invisible lines over the arrows’ stems and invisible circles of the right radius over the arrows’ heads.

1 Like

I was thinking about it. Works. Thank you.