Hi,
I’m trying to show some long text descriptions on hover, but I can’t quite figure out how to do it. I don’t want the descriptions to show up in the x-axis ticks, because they are pretty long and they make the x-axis space out incorrectly. But I’m not sure how to reference them in the hover window if they’re not in the ‘cat’ variable. I can’t put them in as an additional column because they are text data and the high level Bar chart expects numeric columns.
descriptions=[‘long description1’, ‘long description 2’, ‘long description 3’, ‘long description 4’, ‘long description 5’]
data = {“z”: [1, 5, 12, 4, 2]}
p = Bar(data, width=500, height=500)
hover = HoverTool(
tooltips = [
(“index”, “$index”),
("(x,y)", “($x, $y)”),
(“z”, “@z”),
]
)
p.add_tools(hover)
show(p)
Is this something that should even be done using the high-level Bar chart, or am I better off downshifting into the bokeh.plotting library? Or am I a perhaps making an error on some other level?
Thanks,
John
