Highlighting a data line when hovering over it?

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!

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, [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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.

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, [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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.

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, [email protected] 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.

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, [email protected] 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: http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-hover

On Sun, Sep 27, 2015 at 8:15 AM, <[email protected]> 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 [email protected].
To post to this group, send email to [email protected].
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 [email protected].
To post to this group, send email to [email protected].
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.