I have 3 plots on the same graph (Bokeh 0.12.7)
I want to show a single tooltip with the summary of all data for the 3 graphs, like this:
but I obtain 2/3 overlapped (and identical) tooltips whenever the mouse pointer is too close to multiple plots, like in this case:
It is possible to restrict the tooltip to a single plot, but this means that nothing happens if the mouse pointer touches the other two: in the following code I use the param names
in HoverTool to apply the tooltip to the first plot only.
Is there a way to have a single hovertool that reacts to all plots?
COMMON_PARAM = dict(x="date_time", source=self.data_source, line_alpha=GRAPH_LINE_ALPHA, line_width=GRAPH_LINE_WIDTH)
line1 = self.figure.line(y=f1,
line_color=GRAPH_LINE_1_COLOR,
name="line_with_hovertool",
**COMMON_PARAM)
line2 = self.figure.line(y=f2,
line_color=GRAPH_LINE_2_COLOR,
**COMMON_PARAM)
line3 = self.figure.line(y=f3),
line_color=GRAPH_LINE_3_COLOR,
**COMMON_PARAM)
hover = HoverTool(
names=["line_with_hovertool"], # applies only to line1
tooltips=
"""
....
""")
self.figure.add_tools(hover)