HoverTool behavior in Bokeh 0.6.1 vs 0.7.0

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:
source = ColumnDataSource(
data = dict(
// set up data for this k
)
)

bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
( … ),
])

Any help or explanation in the change of behavior is appreciated.

Sean

Ok based on the thread “different hover tooltips for different glyphs”

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

···

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:
source = ColumnDataSource(
data = dict(
// set up data for this k
)
)

bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
( … ),
])

Any help or explanation in the change of behavior is appreciated.

Sean

Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

  add a separate tooltip for every hover tool renderer by bryevdv · Pull Request #1511 · bokeh/bokeh · GitHub

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global "tooltip manager" that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

···

On Dec 6, 2014, at 10:23 PM, Sean Truong <[email protected]> wrote:

Ok based on the thread "different hover tooltips for different glyphs"

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:
Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I've tried moving to the code that sets up hover inside my for loop, but it still didn't work.

PSEUDO Code working in 0.6.1:

# Draw a curve for each dataset
for k in datasets:
    source = ColumnDataSource(
        data = dict(
            // set up data for this k
        )
    )

    bk.line( ... )
    bk.square( ... )

# Set up hovertool
hover = bk.curplot().select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
    ( ... ),
])

Any help or explanation in the change of behavior is appreciated.

Sean

--
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/d9ec0593-5067-428b-9d76-98f7bd6eb541%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi Bryan,

Thanks for the quick fix! Unfortunately I use the ‘components’ functionality to embed the div/script onto my pages, and point to the bokeh-0.7.0.min.js via CDN from pydata.org, so I can’t recompile the updated *.coffee files. Or if I can get a diff of the bokeh.js before/after the change, I can then use the bokeh.js on my server. Otherwise I’ll wait for the next release with the fix.

Cheers,
Sean

···

On Saturday, December 6, 2014 9:10:30 PM UTC-8, Bryan Van de ven wrote:

Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

    [https://github.com/bokeh/bokeh/pull/1511](https://github.com/bokeh/bokeh/pull/1511)

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global “tooltip manager” that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

On Dec 6, 2014, at 10:23 PM, Sean Truong [email protected] wrote:

Ok based on the thread “different hover tooltips for different glyphs”

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:

source = ColumnDataSource(
    data = dict(
        // set up data for this k
    )
)
bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))

hover.tooltips = OrderedDict([

( ... ),

])

Any help or explanation in the change of behavior is appreciated.

Sean


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/d9ec0593-5067-428b-9d76-98f7bd6eb541%40continuum.io.

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

Sean, that's definitely an issue. Until now, we have not hosted JS versions for dev builds on the CDN, but have talked about doing so (since not doing so limits the utility of the dev builds in situations like you describe). Perhaps now is the time to investigate automating CDN uploads.

Bryan

···

On Dec 7, 2014, at 12:16 AM, Sean Truong <[email protected]> wrote:

Hi Bryan,

Thanks for the quick fix! Unfortunately I use the 'components' functionality to embed the div/script onto my pages, and point to the bokeh-0.7.0.min.js via CDN from pydata.org, so I can't recompile the updated *.coffee files. Or if I can get a diff of the bokeh.js before/after the change, I can then use the bokeh.js on my server. Otherwise I'll wait for the next release with the fix.

Cheers,
Sean

On Saturday, December 6, 2014 9:10:30 PM UTC-8, Bryan Van de ven wrote:
Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

        add a separate tooltip for every hover tool renderer by bryevdv · Pull Request #1511 · bokeh/bokeh · GitHub

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global "tooltip manager" that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

> On Dec 6, 2014, at 10:23 PM, Sean Truong <[email protected]> wrote:
>
> Ok based on the thread "different hover tooltips for different glyphs"
>
> and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py
>
> It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.
>
> On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:
> Hi,
>
> I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I've tried moving to the code that sets up hover inside my for loop, but it still didn't work.
>
> PSEUDO Code working in 0.6.1:
>
> # Draw a curve for each dataset
> for k in datasets:
> source = ColumnDataSource(
> data = dict(
> // set up data for this k
> )
> )
>
> bk.line( ... )
> bk.square( ... )
>
> # Set up hovertool
> hover = bk.curplot().select(dict(type=HoverTool))
> hover.tooltips = OrderedDict([
> ( ... ),
> ])
>
>
> Any help or explanation in the change of behavior is appreciated.
>
> Sean
>
> --
> 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/d9ec0593-5067-428b-9d76-98f7bd6eb541%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/a9f38ba4-2a01-47e1-820c-de84e7e84871%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Perhaps now is the time to investigate automating CDN uploads.

Trying to look into the problem this week, I think this is one of the things we have to fix soon.

Damian

···

On Sun, Dec 7, 2014 at 4:14 AM, Bryan Van de Ven [email protected] wrote:

Sean, that’s definitely an issue. Until now, we have not hosted JS versions for dev builds on the CDN, but have talked about doing so (since not doing so limits the utility of the dev builds in situations like you describe). Perhaps now is the time to investigate automating CDN uploads.

Bryan

On Dec 7, 2014, at 12:16 AM, Sean Truong [email protected] wrote:

Hi Bryan,

Thanks for the quick fix! Unfortunately I use the ‘components’ functionality to embed the div/script onto my pages, and point to the bokeh-0.7.0.min.js via CDN from pydata.org, so I can’t recompile the updated *.coffee files. Or if I can get a diff of the bokeh.js before/after the change, I can then use the bokeh.js on my server. Otherwise I’ll wait for the next release with the fix.

Cheers,

Sean

On Saturday, December 6, 2014 9:10:30 PM UTC-8, Bryan Van de ven wrote:

Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

    [https://github.com/bokeh/bokeh/pull/1511](https://github.com/bokeh/bokeh/pull/1511)

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global “tooltip manager” that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

On Dec 6, 2014, at 10:23 PM, Sean Truong [email protected] wrote:

Ok based on the thread “different hover tooltips for different glyphs”

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:

source = ColumnDataSource(
    data = dict(
        // set up data for this k
    )
)
bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))

hover.tooltips = OrderedDict([

( ... ),

])

Any help or explanation in the change of behavior is appreciated.

Sean

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/d9ec0593-5067-428b-9d76-98f7bd6eb541%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/a9f38ba4-2a01-47e1-820c-de84e7e84871%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/B6536CA3-4072-4AF3-A242-9ADF8F15BD2C%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Sean, #1511 was merged and a devel build will be available today afternoon.

Can you please, if you have time, confirm that the issue was solved?

Cheers.

Damian

···

On Sunday, December 7, 2014 11:48:51 PM UTC-3, Damian Avila wrote:

Perhaps now is the time to investigate automating CDN uploads.

Trying to look into the problem this week, I think this is one of the things we have to fix soon.

Damian

On Sun, Dec 7, 2014 at 4:14 AM, Bryan Van de Ven [email protected] wrote:

Sean, that’s definitely an issue. Until now, we have not hosted JS versions for dev builds on the CDN, but have talked about doing so (since not doing so limits the utility of the dev builds in situations like you describe). Perhaps now is the time to investigate automating CDN uploads.

Bryan

On Dec 7, 2014, at 12:16 AM, Sean Truong [email protected] wrote:

Hi Bryan,

Thanks for the quick fix! Unfortunately I use the ‘components’ functionality to embed the div/script onto my pages, and point to the bokeh-0.7.0.min.js via CDN from pydata.org, so I can’t recompile the updated *.coffee files. Or if I can get a diff of the bokeh.js before/after the change, I can then use the bokeh.js on my server. Otherwise I’ll wait for the next release with the fix.

Cheers,

Sean

On Saturday, December 6, 2014 9:10:30 PM UTC-8, Bryan Van de ven wrote:

Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

    [https://github.com/bokeh/bokeh/pull/1511](https://github.com/bokeh/bokeh/pull/1511)

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global “tooltip manager” that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

On Dec 6, 2014, at 10:23 PM, Sean Truong [email protected] wrote:

Ok based on the thread “different hover tooltips for different glyphs”

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:

source = ColumnDataSource(
    data = dict(
        // set up data for this k
    )
)
bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))

hover.tooltips = OrderedDict([

( ... ),

])

Any help or explanation in the change of behavior is appreciated.

Sean

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/d9ec0593-5067-428b-9d76-98f7bd6eb541%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/a9f38ba4-2a01-47e1-820c-de84e7e84871%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/B6536CA3-4072-4AF3-A242-9ADF8F15BD2C%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Damian,

I tried out 0.7.1 and now I can see hover tooltips on all curves/glyphs. However, in the previous release HTML escape sequences were recognized in the strings. For example, the ≥ would show up as a “greater than equal” symbol. Now it shows up explicitly as the string “≥” in the tooltip. Note that the only portion I updated was to use the 0.7.1 version of bokeh.min.js.

hover.tooltips = OrderedDict([
    ("data (x, y) ", " (@x%, @y%)"),
    ...
    ("quality ", " &ge; @qual"),
])

Sean

···

On Friday, December 12, 2014 10:56:06 AM UTC-8, Damian Avila wrote:

Sean, #1511 was merged and a devel build will be available today afternoon.

Can you please, if you have time, confirm that the issue was solved?

Cheers.

Damian

On Sunday, December 7, 2014 11:48:51 PM UTC-3, Damian Avila wrote:

Perhaps now is the time to investigate automating CDN uploads.

Trying to look into the problem this week, I think this is one of the things we have to fix soon.

Damian

On Sun, Dec 7, 2014 at 4:14 AM, Bryan Van de Ven [email protected] wrote:

Sean, that’s definitely an issue. Until now, we have not hosted JS versions for dev builds on the CDN, but have talked about doing so (since not doing so limits the utility of the dev builds in situations like you describe). Perhaps now is the time to investigate automating CDN uploads.

Bryan

On Dec 7, 2014, at 12:16 AM, Sean Truong [email protected] wrote:

Hi Bryan,

Thanks for the quick fix! Unfortunately I use the ‘components’ functionality to embed the div/script onto my pages, and point to the bokeh-0.7.0.min.js via CDN from pydata.org, so I can’t recompile the updated *.coffee files. Or if I can get a diff of the bokeh.js before/after the change, I can then use the bokeh.js on my server. Otherwise I’ll wait for the next release with the fix.

Cheers,

Sean

On Saturday, December 6, 2014 9:10:30 PM UTC-8, Bryan Van de ven wrote:

Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

    [https://github.com/bokeh/bokeh/pull/1511](https://github.com/bokeh/bokeh/pull/1511)

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global “tooltip manager” that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

On Dec 6, 2014, at 10:23 PM, Sean Truong [email protected] wrote:

Ok based on the thread “different hover tooltips for different glyphs”

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:

source = ColumnDataSource(
    data = dict(
        // set up data for this k
    )
)
bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))

hover.tooltips = OrderedDict([

( ... ),

])

Any help or explanation in the change of behavior is appreciated.

Sean

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/d9ec0593-5067-428b-9d76-98f7bd6eb541%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/a9f38ba4-2a01-47e1-820c-de84e7e84871%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/B6536CA3-4072-4AF3-A242-9ADF8F15BD2C%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

The HTML escape characters is minor, since I can just use unicode strings within Python. So for the original Hover issue, it works. Thanks!

···

On Fri, Dec 12, 2014 at 3:09 PM, Sean Truong [email protected] wrote:

Hi Damian,

I tried out 0.7.1 and now I can see hover tooltips on all curves/glyphs. However, in the previous release HTML escape sequences were recognized in the strings. For example, the ≥ would show up as a “greater than equal” symbol. Now it shows up explicitly as the string “≥” in the tooltip. Note that the only portion I updated was to use the 0.7.1 version of bokeh.min.js.

hover.tooltips = OrderedDict([
    ("data (x, y) ", " (@x%, @y%)"),
    ...
    ("quality ", " &ge; @qual"),
])

Sean

On Friday, December 12, 2014 10:56:06 AM UTC-8, Damian Avila wrote:

Sean, #1511 was merged and a devel build will be available today afternoon.

Can you please, if you have time, confirm that the issue was solved?

Cheers.

Damian

On Sunday, December 7, 2014 11:48:51 PM UTC-3, Damian Avila wrote:

Perhaps now is the time to investigate automating CDN uploads.

Trying to look into the problem this week, I think this is one of the things we have to fix soon.

Damian

On Sun, Dec 7, 2014 at 4:14 AM, Bryan Van de Ven [email protected] wrote:

Sean, that’s definitely an issue. Until now, we have not hosted JS versions for dev builds on the CDN, but have talked about doing so (since not doing so limits the utility of the dev builds in situations like you describe). Perhaps now is the time to investigate automating CDN uploads.

Bryan

On Dec 7, 2014, at 12:16 AM, Sean Truong [email protected] wrote:

Hi Bryan,

Thanks for the quick fix! Unfortunately I use the ‘components’ functionality to embed the div/script onto my pages, and point to the bokeh-0.7.0.min.js via CDN from pydata.org, so I can’t recompile the updated *.coffee files. Or if I can get a diff of the bokeh.js before/after the change, I can then use the bokeh.js on my server. Otherwise I’ll wait for the next release with the fix.

Cheers,

Sean

On Saturday, December 6, 2014 9:10:30 PM UTC-8, Bryan Van de ven wrote:

Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

    [https://github.com/bokeh/bokeh/pull/1511](https://github.com/bokeh/bokeh/pull/1511)

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global “tooltip manager” that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

On Dec 6, 2014, at 10:23 PM, Sean Truong [email protected] wrote:

Ok based on the thread “different hover tooltips for different glyphs”

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:

source = ColumnDataSource(
    data = dict(
        // set up data for this k
    )
)
bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))

hover.tooltips = OrderedDict([

( ... ),

])

Any help or explanation in the change of behavior is appreciated.

Sean

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/d9ec0593-5067-428b-9d76-98f7bd6eb541%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/a9f38ba4-2a01-47e1-820c-de84e7e84871%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/B6536CA3-4072-4AF3-A242-9ADF8F15BD2C%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

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

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/CsrxBJCM0ic/unsubscribe.

To unsubscribe from this group and all its topics, 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/750605b8-3f57-4c1f-bb76-2aeae178b73c%40continuum.io.

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

Great, thanks for reporting back!
About the html thingsinside the hover, we are discussing it here: https://github.com/bokeh/bokeh/issues/1478.

Cheers.

Damian

···

On Fri, Dec 12, 2014 at 8:21 PM, Sean Truong [email protected] wrote:

The HTML escape characters is minor, since I can just use unicode strings within Python. So for the original Hover issue, it works. 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/CAP2R0uE-8ibhq2gjAK4EKxaQe-nrq51z4Wut66JmCgw3oFQVFA%40mail.gmail.com.

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

On Fri, Dec 12, 2014 at 3:09 PM, Sean Truong [email protected] wrote:

Hi Damian,

I tried out 0.7.1 and now I can see hover tooltips on all curves/glyphs. However, in the previous release HTML escape sequences were recognized in the strings. For example, the ≥ would show up as a “greater than equal” symbol. Now it shows up explicitly as the string “≥” in the tooltip. Note that the only portion I updated was to use the 0.7.1 version of bokeh.min.js.

hover.tooltips = OrderedDict([
    ("data (x, y) ", " (@x%, @y%)"),
    ...
    ("quality ", " &ge; @qual"),
])

Sean

On Friday, December 12, 2014 10:56:06 AM UTC-8, Damian Avila wrote:

Sean, #1511 was merged and a devel build will be available today afternoon.

Can you please, if you have time, confirm that the issue was solved?

Cheers.

Damian

On Sunday, December 7, 2014 11:48:51 PM UTC-3, Damian Avila wrote:

Perhaps now is the time to investigate automating CDN uploads.

Trying to look into the problem this week, I think this is one of the things we have to fix soon.

Damian

On Sun, Dec 7, 2014 at 4:14 AM, Bryan Van de Ven [email protected] wrote:

Sean, that’s definitely an issue. Until now, we have not hosted JS versions for dev builds on the CDN, but have talked about doing so (since not doing so limits the utility of the dev builds in situations like you describe). Perhaps now is the time to investigate automating CDN uploads.

Bryan

On Dec 7, 2014, at 12:16 AM, Sean Truong [email protected] wrote:

Hi Bryan,

Thanks for the quick fix! Unfortunately I use the ‘components’ functionality to embed the div/script onto my pages, and point to the bokeh-0.7.0.min.js via CDN from pydata.org, so I can’t recompile the updated *.coffee files. Or if I can get a diff of the bokeh.js before/after the change, I can then use the bokeh.js on my server. Otherwise I’ll wait for the next release with the fix.

Cheers,

Sean

On Saturday, December 6, 2014 9:10:30 PM UTC-8, Bryan Van de ven wrote:

Sean, you are correct that one possibility is to add multiple hover tools. However, the exiting behavior should not have broken. I have determined a short term fix that restores the previous behavior, and pushed a PR:

    [https://github.com/bokeh/bokeh/pull/1511](https://github.com/bokeh/bokeh/pull/1511)

You can expect this to be part of a dev build release out in the next week or so (or it will be available in master in a day or two, if you care to build Bokeh yourself).

A few notes: this solves the problem by creating a separate tooltip for every renderer the HoverTool is configured with. This means that if there are lots of renderers, and the mouse happens to hit elements of many of them at once, you will get many tooltips (one for each renderer). But if this was not a problem for you before, then it will probably not be one now, either.

The long term solution will involve adding some sort of plot-global “tooltip manager” that can limit the number of tooltips and also handle dodging them visually. That will come in a later release.

Thanks,

Bryan

On Dec 6, 2014, at 10:23 PM, Sean Truong [email protected] wrote:

Ok based on the thread “different hover tooltips for different glyphs”

and also from this example: https://github.com/bokeh/bokeh/blob/f76ccc44fb39007743ffbe71659b282759915653/examples/glyphs/data_tables.py

It looks like I now have to define a separate HoverTool object for each glyph then add it to the plot.tools.

On Saturday, December 6, 2014 7:53:32 PM UTC-8, Sean Truong wrote:

Hi,

I recently upgraded from 0.6.1 to 0.7.0 and it seems the behavior of HoverTool has change. My graph has multiple lines/glyphs and all it took was one call to setup HoverTool so that mousing over any data point would display the tooltip (primarily needed to get the @x and @y values). Now after upgrading to 0.7.0, the HoverTool tooltip only displays data for the last data set in my for loop. I’ve tried moving to the code that sets up hover inside my for loop, but it still didn’t work.

PSEUDO Code working in 0.6.1:

Draw a curve for each dataset

for k in datasets:

source = ColumnDataSource(
    data = dict(
        // set up data for this k
    )
)
bk.line( ... )
bk.square( ... )

Set up hovertool

hover = bk.curplot().select(dict(type=HoverTool))

hover.tooltips = OrderedDict([

( ... ),

])

Any help or explanation in the change of behavior is appreciated.

Sean

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/d9ec0593-5067-428b-9d76-98f7bd6eb541%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/a9f38ba4-2a01-47e1-820c-de84e7e84871%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/B6536CA3-4072-4AF3-A242-9ADF8F15BD2C%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

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

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/CsrxBJCM0ic/unsubscribe.

To unsubscribe from this group and all its topics, 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/750605b8-3f57-4c1f-bb76-2aeae178b73c%40continuum.io.

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