Search code examples
bokeh

How can I configure the TapTool so it does not hide other data points when clicked?


At the moment when a data point is clicked, all other data points are shaded. Is there a way to prevent this?

fig = fig.circle(x, y)

Ideally, I would like to increase size of the selected circle instead. Is there an easy why to do so?

Update

Seems we cannot change size... according to here:

Only the visual properties of selection_glyph and nonselection_glyph are considered when renderering. Changing positions, sizes, etc. will have no effect.

However, we can simulate it using line_width property, it becomes more fun if I combine it with line_dish.


Solution

  • As of Bokeh 0.12.15, you can set nonselection_glyph=None when you call a glyph method, for example:

    p.circle(x, y, radius=radii, fill_color="navy", 
             line_color=None, fill_alpha=0.6, 
    
             # this is the new part
             nonselection_glyph=None)