
I use hovertool and set point_policy=“follow_mouse”,but It seems dosen’t work.The tooltip postion is still beside the line not the mouse cursor position.
from bokeh.plotting import figure, show
from bokeh.models import HoverTool
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
p = figure(title="Simple line example", x_axis_label="x", y_axis_label="y")
p.line(x, y, legend_label="Temp.", line_width=2)
tool_1 = HoverTool(
tooltips=[
("x_value", "@x"),
("y_value", "@y"),
],
mode='vline',
point_policy="follow_mouse",
)
p.add_tools(tool_1)
show(p)
here is the figure
below is what I want
Thanks a lot!!



