☰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

Highlighting a data line when hovering over it?

Community Support
Sarah_Bird3
Sarah_Bird3

Currently, the only way to do that is with CustomJS. See here for an example: http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-hover

···

On Sun, Sep 27, 2015 at 8:15 AM, google@django.in-berlin.de wrote:

Is it possible to highlight a data line when hovering with the mouse of it and how? For example, by making it thicker and/or change its color?

Thanks!

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ea9ddceb-e272-446e-9903-de87b128823a%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
google
google

Thanks, that works fine with one data source, but I’m using multiple data sources, which made me test adding multiple hoover tools, one for each data source (and line). Surprisingly, this kind of works, but feels like doing it totally wrong, apart from giving a worse performance, too. Shall I better assume that one should use only one data source per plot? But then, even if I can structure the ColumnDataSource instance at will I’d still need to provide multiple callbacks for a single hoover, which is likely wrong, too.

···

Am Sonntag, 27. September 2015 22:00:35 UTC+2 schrieb Sarah Bird:

Currently, the only way to do that is with CustomJS. See here for an example: http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-hover

On Sun, Sep 27, 2015 at 8:15 AM, goo...@django.in-berlin.de wrote:

Is it possible to highlight a data line when hovering with the mouse of it and how? For example, by making it thicker and/or change its color?

Thanks!

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ea9ddceb-e272-446e-9903-de87b128823a%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
tfast
tfast

It feels so wrong to have all those data sources doing all those things doesn’t it? I will use many datasources in a Bokeh. In fact, the Bokeh high-level charts will create several data sources. It’s not so bad.

Bokeh provides the ability to interact with data. Data is almost always complicated. Interactions like the HoverTool can help your audience navigate some of the complexity. Bokeh is there for the interactions. Adding and improving interactions will increase the size of the file containing your figure, but the performance shouldn’t suffer.

···

On Monday, September 28, 2015 at 6:12:18 AM UTC-4, goo...@django.in-berlin.de wrote:

Thanks, that works fine with one data source, but I’m using multiple data sources, which made me test adding multiple hoover tools, one for each data source (and line). Surprisingly, this kind of works, but feels like doing it totally wrong, apart from giving a worse performance, too. Shall I better assume that one should use only one data source per plot? But then, even if I can structure the ColumnDataSource instance at will I’d still need to provide multiple callbacks for a single hoover, which is likely wrong, too.

⌁   Link to post
Bryan
Bryan

ColumnDataSource objects are basically a "cheap DataFrame" and one of the built-in assumptions is that all the columns have the same length. If you have lots of data of the same length, it's fine to share the data source among glyphs. But if you are dealing with data sets that have differing lengths, it is completely appropriate and expected (and necessary, really) to have different ColumnDataSources for the different glyphs.

Bryan

···

On Sep 28, 2015, at 5:12 AM, google@django.in-berlin.de wrote:

Thanks, that works fine with one data source, but I'm using multiple data sources, which made me test adding multiple hoover tools, one for each data source (and line). Surprisingly, this kind of works, but feels like doing it totally wrong, apart from giving a worse performance, too. Shall I better assume that one should use only one data source per plot? But then, even if I can structure the ColumnDataSource instance at will I'd still need to provide multiple callbacks for a single hoover, which is likely wrong, too.

Am Sonntag, 27. September 2015 22:00:35 UTC+2 schrieb Sarah Bird:
Currently, the only way to do that is with CustomJS. See here for an example: Interaction — Bokeh 3.3.2 Documentation

On Sun, Sep 27, 2015 at 8:15 AM, <goo...@django.in-berlin.de> wrote:
Is it possible to highlight a data line when hovering with the mouse of it and how? For example, by making it thicker and/or change its color?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ea9ddceb-e272-446e-9903-de87b128823a%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/dada2520-dd2d-4095-b999-0505b74497a8%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled