Selection properties of glyphs

Hi all,

I am trying to build a more extensive standalone dashboard, and find it hard to navigate well within the documentation.

From docs here I can see that it is possible to change the color, fill_color, alpha, fill_alpha when performing a selection.

However, my expectation of being able to do selection_size is not supported. The resulting error is: unexpected attribute 'selection_size' to Scatter, possible attributes are angle, angle_units, fill_alpha, fill_color, js_event_callbacks, js_property_callbacks, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, marker, name, size, subscribed_events, tags, x or y. But those do not include any of the selection_ or nonselection_ options?

Googling any combination of bokeh, selection, glyph, options, properties doesn’t help :frowning:


It’s not in the docs because it is not currently possible. For fairly uninteresting technical reasons, only the fill and line properties can be specified for selection glyphs. It’s possible some intended work next year will allow sizes to also be specified. In the meantime the only workaround I can imagine is to just a selection callback to manually update sizes given in a column in a column data source.

Thanks for the clarification, I assume that means having a completely separate glyph and changing it through renderer.nonselection_glyph = ... also would not work.

@23pointsNorth Maybe you can provide some code sketch or psuedo-code? I am not really following what you are proposing.