I updated to bokeh version 2.2.1 from version 1.3.4 and now I do not see any tooltip boxes when I hover over lines in a multi_line bokeh chart. I think my code is okay, it’s the same exact code I was using in version 1.3.4 where the tooltips did appear when I hovered over the lines.
Does anyone know if this is a bug or if this is a work around to do show tooltips on multi_line bokeh charts?
Here is the .py code so anyone can replicate the issue.
from bokeh.plotting import figure, output_file, show
from bokeh.models import ColumnDataSource
import pandas as pd
df = pd.DataFrame()
df['fruit'] = pd.Series([i*2 for i in range(0,10)])
df['vegetable'] = pd.Series([i*3 for i in range(0,10)])
dates = pd.to_datetime(
list(pd.date_range(start="2009-11-04", end="2009-11-13")))
lst = [df[i].tolist() for i in df.columns]
cds = ColumnDataSource(data=dict(
x = [dates] * 2, y = lst,
food_type = list(df.columns)))
tooltips = [("FoodType", "@food_type")]
#figure
p = figure(tooltips = tooltips, x_axis_type = 'datetime')
# glyph
p.multi_line('x','y', color = 'black',
hover_line_color = 'red',
hover_line_width = 1,
source = cds)
output_file("food_harvest.html")
show(p)
Thanks

