I have a scatter plot containing multiple renderers that update on a slider value. I’m having an issue setting the hover tool to work on one renderer only.
I would expect something like below would be sufficient:
#build glyphs perSliderInc
rend_source = sourceSliderInc[’_%s’ % listSliderInc[0]]
circle1_glyph = Circle(
x=‘X2’, y=‘Y2’, radius = ‘SIZEB’,
fill_color=None,
line_color=‘COLORB’, line_width=‘LINEB’, line_alpha=‘ALPHA’)
fig.add_glyph(rend_source, circle1_glyph)
circle2_glyph = Circle(
x=‘X’, y=‘Y’, size=‘SIZED’,
fill_color=‘COLORMAIN’,fill_alpha=‘ALPHA’,
line_color=‘COLORSUB’, line_width=3, line_alpha=‘ALPHA’)
fig.add_glyph(rend_source, circle2_glyph)
hover = HoverTool(tooltips=tooltips, renderers=[circle1_glyph])
fig.add_tools(hover)
But I get this error:
ValueError: expected an element of List(Instance(Renderer)), got seq with invalid items [<bokeh.models.markers.Circle object at 0x0000000015C45A90>]
Any ideas on what I’m overlooking?