Hover tool doesn't work properly with multiple scatter plots

In a figure with multiple line and scatter plots, hover works as expected only on the last added scatter plot (top line), showing scatter point for the hovered index on all the lines, whereas hover on the other lines doesn’t show any. Can this be fixed? Thanks.

from bokeh.plotting import figure, show, output_notebook
from bokeh.models import ColumnDataSource
output_notebook()

p = figure(tools='hover')

source = ColumnDataSource({
    'x': [1, 2, 3],
    'y1': [1, 2, 3],
    'y2': [2, 3, 4],
    'y3': [3, 4, 5],
})

p.line(x='x', y='y1', color='red', source=source)
p.line(x='x', y='y2', color='blue', source=source)
p.line(x='x', y='y3', color='green', source=source)

p.scatter(x='x', y='y1', source=source, size=20, line_color=None, fill_color='red', fill_alpha=0.1, hover_fill_alpha=1)
p.scatter(x='x', y='y2', source=source, size=20, line_color=None, fill_color='blue', fill_alpha=0.1, hover_fill_alpha=1)
p.scatter(x='x', y='y3', source=source, size=20, line_color=None, fill_color='green', fill_alpha=0.1, hover_fill_alpha=1)

show(p)

It’s a known limitation/bug. See issues:

Thanks. :+1:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.