Activate hover properties for all lines of multi_line

Is there any way to activate hover properties for all lines of MultiLine glyph simultaneously?
Currently, only one line adopts hover_line_alpha. Is there a workaround that allows this?

There is not, if I understand what you are asking for. Multi-line is analogous to the scatter glyphs, only what is scattered is smaller individual lines. The vastly most common need is to have only what is under the cursor be highlighted (to distinguish it apart from the elements not under the cursor). Can why you want to do this (i.e. what you are trying to accomplish from a higher level, without assuming an implementation)? Perhaps there is another approach entirely.

Thanks for the answer.
The original task is to save hovered line its original alpha, while the rest lines should reduce their alpha, in case of no lines are under the cursor all lines expect to have their original properties.

I thought to achieve such behavior with one MultiLine and number of Lines by a reduction alpha for the MultiLine and increasing alpha for Line (if it was possible to trigger hover for all lines from MultiLine simultaneously).

You could potentially try rendering the MultiLine as a Line instead, using nan values to split the line into “pieces”. Then it will behave as a single object with respect to hover properties.

Thanks for the quick response!
The way you suggested do really work, but, unfortunately, in such case, the possibility to customize each piece color is lost, what is also critical.

Right, that is definitely a trade-off with the approach. I am afraid I don’t really have any other suggestions short of creating a custom extension of some sort. But GlyphRenderer and HoverTool are both two of the most complicated Bokeh objects, so I don’t think it would be trivial to accomplish.

Is there a reasonable workaround with events usage and not creating custom GlyphRenderer and HoverTool?

In principle. A CustomJS on mouse move could perform the necessary hit-testing on the multi-line and set the inspection value on the data source. Not sure if it’s reasonable or not, I think it would also be non-trivial.

Bryan, thanks for the suggestion.

@alex did you solve this?

@fparaggio, no solution