Hovertool and multiline with bokeh 2.2.3

I’m trying to use the HoverTool with multiple lines.

from bokeh.io import show
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource, HoverTool
from pandas import DataFrame
x = [[1,2,3],[1,2,4]]
y = [[4,5,6],[2,3,4]]
name = ["a","b"]
df = DataFrame({"x":x,"y":y,"name":name})
source = ColumnDataSource(df)

p = figure(title="Test MultiLine")
p.multi_line(xs="x",ys="y",source =source,line_width=2)

hover_tool = HoverTool( tooltips=[( 'Name ', '@name')])

This code works very well with bokeh 2.0.0: when getting the mouse over lines, the name appears.
But with bokeh 2.2.3 the label is never displayed, as if hovertool did not work.
Could you explain me how to change my code so it can work with Bokeh 2.2.3 ?

Thank you

Hi @aurelie ,

This is a known issue, and one that’s being fixed in 2.3 (out very soon).

1 Like

@aurelie , 2.3 is out! Your multiline hover issue should be resolved (but of course let us know if you see further issues). Thanks for your patience!

1 Like