☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How to highlight selected area when using Line glyph?

Community Supportserver
roinr
roinr

When I use the Circle glyph, the data points that are included in the selected area (using the BoxSelectTool) are being highlighted automatically.
When I switch to the Line glyph nothing happens.
How can I highlight the selected area of a line and get the selected data points?

⌁   Link to post
roinr
roinr

@_jm
Thanks for your reply!
I’m afraid the line glyph is the best fit in my case (I’m displaying X vs Y data). An interesting thing that I noticed is that when I use both the circle and line glyphs, I’m able to highlight the selected area of the line (see attached pic). It seems like it’s due to the fact that the circle glyph changes the source selected property automatically (something that the line glyph doesn’t do). The question is whether it is possible to make the line glyph do the same.
BTW, I tried to make the circle glyph invisible but then the selected area wasn’t being highlighted.

⌁   Link to post
_jm
_jm

@roinr

You might be able to make the line glyph achieve what you want but I have no idea how involved it would be. (I recently had to make my own replacement for Bokeh Div in a server application because of client redrawing/layout behaviors that I didn’t want.)

Your combination line/circle finding is interesting. Perhaps instead of making the circles invisible, try setting the circles’ line_alpha and fill_alpha properties both to 0.000. Then they will still be visible from the perspective of the software and any underlying machinery that uses the visible property, but will be invisible/transparent to the user.

⌁   Link to post

End of archived discussion · Replies are disabled