Is there a way to format the float number displayed in Hover tooltips?

I am using bokeh 0.10 and the tooltips is configured as
tooltips = [("(x, y)", “(@x, @y)”)]
I found a possible solution at StackOverflow (http://stackoverflow.com/questions/28999411/how-to-show-integer-not-float-with-hover-tooltip-in-bokeh), like this
tooltips = [("(x, y)", “(@x, @y{1.11})”)]
Now y is expected to be displayed with two decimals. But it does not work in my case. Is there any documentation on this issue?

Also, I know we can restrict the hover tool to a set of renderers. But can hover tool display different tooltips for different renderers? Say if there are two scatter renderers A and B in a plot, I want to display
tooltips = [("(x, y)", “(@x, @y)”)]
for A, and to display
tooltips = [(“index”, “$index”)]
for B. Can I add two hover tools to the same plot?

Thanks!

1) For the float try: {0.00} see
https://github.com/bokeh/bokeh/blob/master/examples/glyphs/sprint.py#L96

2) Yes, you can add two hover tools to the same plot. See the example here:

https://github.com/bokeh/bokeh/blob/master/examples/glyphs/data_tables.py#L56

you can still use figure or chart or whatever you're using to setup your
plot. Just start with setting the tools to not include 'hover' e.g.
tools='' and then do plot.add_tools(....) as shown in the link above.

Specifying the renderers arg lets you specify which glyphs the hover
tool attaches to.

···

On 11/6/15 11:48 AM, Yixin Liu wrote:

I am using bokeh 0.10 and the tooltips is configured as
tooltips = [("(x, y)", "(@x, @y)")]
I found a possible solution at StackOverflow
(python - how to show integer, not float, with hover tooltip in bokeh - Stack Overflow),
like this
tooltips = [("(x, y)", "(@x, @y{1.11})")]
Now y is expected to be displayed with two decimals. But it does not
work in my case. Is there any documentation on this issue?

Also, I know we can restrict the hover tool to a set of renderers. But
can hover tool display different tooltips for different renderers? Say
if there are two scatter renderers A and B in a plot, I want to display
tooltips = [("(x, y)", "(@x, @y)")]
for A, and to display
tooltips = [("index", "$index")]
for B. Can I add two hover tools to the same plot?

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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io?utm_medium=email&utm_source=footer&gt;\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Just tried myself and both

[("(x, y)", "(@x, @y{1.11})")]

and

[("(x, y)", "(@x, @y{0.00})")]

work for me. Sorry, I'm not sure what's going on for you here.

···

On 11/6/15 3:01 PM, Sarah Bird wrote:

1) For the float try: {0.00} see
https://github.com/bokeh/bokeh/blob/master/examples/glyphs/sprint.py#L96

2) Yes, you can add two hover tools to the same plot. See the example here:

https://github.com/bokeh/bokeh/blob/master/examples/glyphs/data_tables.py#L56

you can still use figure or chart or whatever you're using to setup your
plot. Just start with setting the tools to not include 'hover' e.g.
tools='' and then do plot.add_tools(....) as shown in the link above.

Specifying the renderers arg lets you specify which glyphs the hover
tool attaches to.

On 11/6/15 11:48 AM, Yixin Liu wrote:

I am using bokeh 0.10 and the tooltips is configured as
tooltips = [("(x, y)", "(@x, @y)")]
I found a possible solution at StackOverflow
(python - how to show integer, not float, with hover tooltip in bokeh - Stack Overflow),
like this
tooltips = [("(x, y)", "(@x, @y{1.11})")]
Now y is expected to be displayed with two decimals. But it does not
work in my case. Is there any documentation on this issue?

Also, I know we can restrict the hover tool to a set of renderers. But
can hover tool display different tooltips for different renderers? Say
if there are two scatter renderers A and B in a plot, I want to display
tooltips = [("(x, y)", "(@x, @y)")]
for A, and to display
tooltips = [("index", "$index")]
for B. Can I add two hover tools to the same plot?

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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io?utm_medium=email&utm_source=footer&gt;\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Yes, it works fine for @x, and @y. Sorry, I have simplified the code and didn’t expect this is actually the subtle cause.
My real case is below

phases = [‘DIS’, ‘LAM’, ‘HEX’, ‘Gyroid’, ‘O70’, ‘Sigma’, ‘BCC’]
tooltips = [(“phase”, “@stable_phase”),
(“(x, y)”, “(@x{0.00}, @y{0.0})”),
]
for phase in phases:
tooltips += [(“F(” + phase + “)”, “@F_” + phase + “{0.000000}”)]

For ‘x’ and ‘y’ columns, it works, but not for ‘F_DIS’, ‘F_LAM’ columns etc. Removing the “{0.000000}” format string will display these columns in three decimals.
By the way, for those “F_”+phase columns, there are several “NaN” values. Does the problem relate to the column name, “_” and number contained or the “NaN” value?

By the way, multiple hover tools work like a charm. I love it. Thanks!

···

On Friday, November 6, 2015 at 3:23:49 PM UTC-8, Sarah Bird wrote:

Just tried myself and both

[(“(x, y)”, “(@x, @y{1.11})”)]

and

[(“(x, y)”, “(@x, @y{0.00})”)]

work for me. Sorry, I’m not sure what’s going on for you here.

On 11/6/15 3:01 PM, Sarah Bird wrote:

  1. For the float try: {0.00} see

https://github.com/bokeh/bokeh/blob/master/examples/glyphs/sprint.py#L96

  1. Yes, you can add two hover tools to the same plot. See the example here:

https://github.com/bokeh/bokeh/blob/master/examples/glyphs/data_tables.py#L56

you can still use figure or chart or whatever you’re using to setup your

plot. Just start with setting the tools to not include ‘hover’ e.g.

tools=‘’ and then do plot.add_tools(…) as shown in the link above.

Specifying the renderers arg lets you specify which glyphs the hover

tool attaches to.

On 11/6/15 11:48 AM, Yixin Liu wrote:

I am using bokeh 0.10 and the tooltips is configured as

tooltips = [(“(x, y)”, “(@x, @y)”)]

I found a possible solution at StackOverflow

(http://stackoverflow.com/questions/28999411/how-to-show-integer-not-float-with-hover-tooltip-in-bokeh),

like this

tooltips = [(“(x, y)”, “(@x, @y{1.11})”)]

Now y is expected to be displayed with two decimals. But it does not

work in my case. Is there any documentation on this issue?

Also, I know we can restrict the hover tool to a set of renderers. But

can hover tool display different tooltips for different renderers? Say

if there are two scatter renderers A and B in a plot, I want to display

tooltips = [(“(x, y)”, “(@x, @y)”)]

for A, and to display

tooltips = [(“index”, “$index”)]

for B. Can I add two hover tools to the same plot?

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]

mailto:[email protected].

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

mailto:[email protected].

To view this discussion on the web visit

https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io

<https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io?utm_medium=email&utm_source=footer>.

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

Still waiting for the answer …
Format string is not working properly with column data containing “NaN” value. It may also caused by improper column data name.

Thanks.

···

On Friday, November 6, 2015 at 3:35:57 PM UTC-8, Yixin Liu wrote:

Yes, it works fine for @x, and @y. Sorry, I have simplified the code and didn’t expect this is actually the subtle cause.
My real case is below

phases = [‘DIS’, ‘LAM’, ‘HEX’, ‘Gyroid’, ‘O70’, ‘Sigma’, ‘BCC’]
tooltips = [(“phase”, “@stable_phase”),
(“(x, y)”, “(@x{0.00}, @y{0.0})”),
]
for phase in phases:
tooltips += [(“F(” + phase + “)”, “@F_” + phase + “{0.000000}”)]

For ‘x’ and ‘y’ columns, it works, but not for ‘F_DIS’, ‘F_LAM’ columns etc. Removing the “{0.000000}” format string will display these columns in three decimals.
By the way, for those “F_”+phase columns, there are several “NaN” values. Does the problem relate to the column name, “_” and number contained or the “NaN” value?

By the way, multiple hover tools work like a charm. I love it. Thanks!

On Friday, November 6, 2015 at 3:23:49 PM UTC-8, Sarah Bird wrote:

Just tried myself and both

[(“(x, y)”, “(@x, @y{1.11})”)]

and

[(“(x, y)”, “(@x, @y{0.00})”)]

work for me. Sorry, I’m not sure what’s going on for you here.

On 11/6/15 3:01 PM, Sarah Bird wrote:

  1. For the float try: {0.00} see

https://github.com/bokeh/bokeh/blob/master/examples/glyphs/sprint.py#L96

  1. Yes, you can add two hover tools to the same plot. See the example here:

https://github.com/bokeh/bokeh/blob/master/examples/glyphs/data_tables.py#L56

you can still use figure or chart or whatever you’re using to setup your

plot. Just start with setting the tools to not include ‘hover’ e.g.

tools=‘’ and then do plot.add_tools(…) as shown in the link above.

Specifying the renderers arg lets you specify which glyphs the hover

tool attaches to.

On 11/6/15 11:48 AM, Yixin Liu wrote:

I am using bokeh 0.10 and the tooltips is configured as

tooltips = [(“(x, y)”, “(@x, @y)”)]

I found a possible solution at StackOverflow

(http://stackoverflow.com/questions/28999411/how-to-show-integer-not-float-with-hover-tooltip-in-bokeh),

like this

tooltips = [(“(x, y)”, “(@x, @y{1.11})”)]

Now y is expected to be displayed with two decimals. But it does not

work in my case. Is there any documentation on this issue?

Also, I know we can restrict the hover tool to a set of renderers. But

can hover tool display different tooltips for different renderers? Say

if there are two scatter renderers A and B in a plot, I want to display

tooltips = [(“(x, y)”, “(@x, @y)”)]

for A, and to display

tooltips = [(“index”, “$index”)]

for B. Can I add two hover tools to the same plot?

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]

mailto:[email protected].

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

mailto:[email protected].

To view this discussion on the web visit

https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io

<https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io?utm_medium=email&utm_source=footer>.

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

Yuxin,

It's possible you have exposed an unknown bug. I think you are going to have to provide a complete minimal runnable example that demonstrates the problem in order for us to be able to help much more. At a certain point there is not much more we can do without being able to reproduce the problem directly, since this will require debugging in the browser.

Thanks,

Bryan

···

On Nov 12, 2015, at 9:45 PM, Yixin Liu <[email protected]> wrote:

Still waiting for the answer ...
Format string is not working properly with column data containing "NaN" value. It may also caused by improper column data name.

Thanks.

On Friday, November 6, 2015 at 3:35:57 PM UTC-8, Yixin Liu wrote:
Yes, it works fine for @x, and @y. Sorry, I have simplified the code and didn't expect this is actually the subtle cause.
My real case is below

phases = ['DIS', 'LAM', 'HEX', 'Gyroid', 'O70', 'Sigma', 'BCC']
tooltips = [("phase", "@stable_phase"),
             ("(x, y)", "(@x{0.00}, @y{0.0})"),
             ]
for phase in phases:
    tooltips += [("F(" + phase + ")", "@F_" + phase + "{0.000000}")]

For 'x' and 'y' columns, it works, but not for 'F_DIS', 'F_LAM' columns etc. Removing the "{0.000000}" format string will display these columns in three decimals.
By the way, for those "F_"+phase columns, there are several "NaN" values. Does the problem relate to the column name, "_" and number contained or the "NaN" value?

By the way, multiple hover tools work like a charm. I love it. Thanks!

On Friday, November 6, 2015 at 3:23:49 PM UTC-8, Sarah Bird wrote:
Just tried myself and both

[("(x, y)", "(@x, @y{1.11})")]

and

[("(x, y)", "(@x, @y{0.00})")]

work for me. Sorry, I'm not sure what's going on for you here.

On 11/6/15 3:01 PM, Sarah Bird wrote:
>
> 1) For the float try: {0.00} see
> https://github.com/bokeh/bokeh/blob/master/examples/glyphs/sprint.py#L96
>
> 2) Yes, you can add two hover tools to the same plot. See the example here:
>
> https://github.com/bokeh/bokeh/blob/master/examples/glyphs/data_tables.py#L56
>
> you can still use figure or chart or whatever you're using to setup your
> plot. Just start with setting the tools to not include 'hover' e.g.
> tools='' and then do plot.add_tools(....) as shown in the link above.
>
> Specifying the renderers arg lets you specify which glyphs the hover
> tool attaches to.
>
>
>
>
>
> On 11/6/15 11:48 AM, Yixin Liu wrote:
>> I am using bokeh 0.10 and the tooltips is configured as
>> tooltips = [("(x, y)", "(@x, @y)")]
>> I found a possible solution at StackOverflow
>> (python - how to show integer, not float, with hover tooltip in bokeh - Stack Overflow),
>> like this
>> tooltips = [("(x, y)", "(@x, @y{1.11})")]
>> Now y is expected to be displayed with two decimals. But it does not
>> work in my case. Is there any documentation on this issue?
>>
>> Also, I know we can restrict the hover tool to a set of renderers. But
>> can hover tool display different tooltips for different renderers? Say
>> if there are two scatter renderers A and B in a plot, I want to display
>> tooltips = [("(x, y)", "(@x, @y)")]
>> for A, and to display
>> tooltips = [("index", "$index")]
>> for B. Can I add two hover tools to the same plot?
>>
>> 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
>> <mailto:[email protected]>.
>> To post to this group, send email to bo...@continuum.io
>> <mailto:[email protected]>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io
>> <https://groups.google.com/a/continuum.io/d/msgid/bokeh/282c2239-54af-44f3-a824-ab03c24c94ac%40continuum.io?utm_medium=email&utm_source=footer&gt;\.
>> 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/e862795a-a9e9-4590-b4c7-dfeedf747bca%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi Bryan,

The following minimal code will reproduce the issue I am encountered. Note that the tooltips for the upper left point (1, 3) displays correctly while the other two points do not show any tooltips when mouse hover over them. I am sure now it is caused by one of column data is np.nan. For example, the middle point (2, 2) has np.nan in F_LAM column, and the bottom point (3, 1) has np.nan in F_HEX column.

import numpy as np
import bokeh.plotting as bplot
from bokeh.models import ColumnDataSource, HoverTool

bplot.output_file(‘test_hover_float_format’)

TOOLS = “crosshair,pan,box_zoom,reset,tap,previewsave”
colors = [‘#e41a1c’, ‘#377eb8’]
x = [1, 2, 3]
y = [3, 2, 1]
stable_phase = [‘HEX’, ‘HEX’, ‘LAM’]
F = {‘LAM’: [3.28457, np.nan, 2.889993], ‘HEX’: [2.99933, 3.90011, np.nan]}
fill_color = [colors[0], colors[0], colors[1]]

source = ColumnDataSource(dict(x=x, y=y, stable_phase=stable_phase,
F_LAM=F[‘LAM’], F_HEX=F[‘HEX’],
fill_color=fill_color))

raw = bplot.figure(tools=TOOLS, width=450, height=450)
raw.scatter(‘x’, ‘y’, source=source, size=12,
fill_color=fill_color, line_color=None, name=‘phase_point’)

tooltips1 = [(“phase”, “@stable_phase”),
(“(x, y)”, “(@x{0.00}, @y{0.00})”),
(“F_LAM”, “@F_LAM{0.0000}”),
(“F_HEX”, “@F_HEX{0.0000}”),
]
hover1 = HoverTool(tooltips=tooltips1, names=[‘phase_point’],
mode=‘mouse’, point_policy=‘snap_to_data’)
raw.add_tools(hover1)

bplot.show(raw)

···

On Thursday, November 12, 2015 at 3:57:58 PM UTC-8, Bryan Van de ven wrote:

Yuxin,

It’s possible you have exposed an unknown bug. I think you are going to have to provide a complete minimal runnable example that demonstrates the problem in order for us to be able to help much more. At a certain point there is not much more we can do without being able to reproduce the problem directly, since this will require debugging in the browser.

Thanks,

Bryan

This is a bug. Unfortunately it’s in the upstream library Numeral.js.

              I have documented here:
···

https://github.com/bokeh/bokeh/issues/3120

                      Thanks for finding this

Yixin, sorry that doesn’t help with your plot.

On 11/12/15 4:41 PM, Yixin Liu wrote:

Hi Bryan,

    The following minimal code will reproduce the issue I am

encountered. Note that the tooltips for the upper left point (1,
3) displays correctly while the other two points do not show any
tooltips when mouse hover over them. I am sure now it is caused
by one of column data is np.nan. For example, the middle
point (2, 2) has np.nan in F_LAM column, and the bottom
point (3, 1) has np.nan in F_HEX column.

    import numpy as np

    import bokeh.plotting as bplot

    from bokeh.models import ColumnDataSource, HoverTool



    bplot.output_file('test_hover_float_format')



    TOOLS = "crosshair,pan,box_zoom,reset,tap,previewsave"

    colors = ['#e41a1c', '#377eb8']

    x = [1, 2, 3]

    y = [3, 2, 1]

    stable_phase = ['HEX', 'HEX', 'LAM']

    F = {'LAM': [3.28457, np.nan, 2.889993], 'HEX': [2.99933,

3.90011, np.nan]}

    fill_color = [colors[0], colors[0], colors[1]]



    source = ColumnDataSource(dict(x=x, y=y,

stable_phase=stable_phase,

                                   F_LAM=F['LAM'], F_HEX=F['HEX'],

                                   fill_color=fill_color))



    raw = bplot.figure(tools=TOOLS, width=450, height=450)

    raw.scatter('x', 'y', source=source, size=12,

                fill_color=fill_color, line_color=None,

name=‘phase_point’)

    tooltips1 = [("phase", "@stable_phase"),

                 ("(x, y)", ),
         ("F_LAM", "@F_LAM{0.0000}"),
         ("F_HEX", "@F_HEX{0.0000}"),
         ]

hover1 = HoverTool(tooltips=tooltips1, names=[‘phase_point’],
mode=‘mouse’, point_policy=‘snap_to_data’)
raw.add_tools(hover1)
bplot.show(raw)
On Thursday, November 12, 2015 at 3:57:58 PM UTC-8, Bryan Van de
ven wrote:

  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/57be3f35-3730-4e9b-8534-2fdd6317cfb1%40continuum.io?utm_medium=email&utm_source=footer)      .

For more options, visit .

“(@x{0.00}, @y{0.00})”

Yuxin,

      It's possible you have exposed an unknown bug. I think you are

going to have to provide a complete minimal runnable example
that demonstrates the problem in order for us to be able to
help much more. At a certain point there is not much more we
can do without being able to reproduce the problem directly,
since this will require debugging in the browser.

      Thanks,




      Bryan

https://groups.google.com/a/continuum.io/d/msgid/bokeh/57be3f35-3730-4e9b-8534-2fdd6317cfb1%40continuum.io
https://groups.google.com/a/continuum.io/d/optout

Perhaps it might work on this PR that replaces Numeral with Numbro?

  Use numbro.js instead of Numeral.js by dennisobrien · Pull Request #3025 · bokeh/bokeh · GitHub

If so that would be a reason to speed that PR along.

Bryan

···

On Nov 12, 2015, at 11:50 PM, Sarah Bird <[email protected]> wrote:

This is a bug. Unfortunately it's in the upstream library Numeral.js.

I have documented here: NaN in data causes hover to break if formatter applied · Issue #3120 · bokeh/bokeh · GitHub

Thanks for finding this Yixin, sorry that doesn't help with your plot.

On 11/12/15 4:41 PM, Yixin Liu wrote:

Hi Bryan,

The following minimal code will reproduce the issue I am encountered. Note that the tooltips for the upper left point (1, 3) displays correctly while the other two points do not show any tooltips when mouse hover over them. I am sure now it is caused by one of column data is ``np.nan``. For example, the middle point (2, 2) has ``np.nan`` in F_LAM column, and the bottom point (3, 1) has ``np.nan`` in F_HEX column.

import numpy as np
import bokeh.plotting as bplot
from bokeh.models import ColumnDataSource, HoverTool

bplot.output_file('test_hover_float_format')

TOOLS = "crosshair,pan,box_zoom,reset,tap,previewsave"
colors = ['#e41a1c', '#377eb8']
x = [1, 2, 3]
y = [3, 2, 1]
stable_phase = ['HEX', 'HEX', 'LAM']
F = {'LAM': [3.28457, np.nan, 2.889993], 'HEX': [2.99933, 3.90011, np.nan]}
fill_color = [colors[0], colors[0], colors[1]]

source = ColumnDataSource(dict(x=x, y=y, stable_phase=stable_phase,
                               F_LAM=F['LAM'], F_HEX=F['HEX'],
                               fill_color=fill_color))

raw = bplot.figure(tools=TOOLS, width=450, height=450)
raw.scatter('x', 'y', source=source, size=12,
            fill_color=fill_color, line_color=None, name='phase_point')

tooltips1 = [("phase", "@stable_phase"),
             ("(x, y)", "(@x{0.00}, @y{0.00})"),
             ("F_LAM", "@F_LAM{0.0000}"),
             ("F_HEX", "@F_HEX{0.0000}"),
             ]
hover1 = HoverTool(tooltips=tooltips1, names=['phase_point'],
                   mode='mouse', point_policy='snap_to_data')
raw.add_tools(hover1)

bplot.show(raw)

On Thursday, November 12, 2015 at 3:57:58 PM UTC-8, Bryan Van de ven wrote:
Yuxin,

It's possible you have exposed an unknown bug. I think you are going to have to provide a complete minimal runnable example that demonstrates the problem in order for us to be able to help much more. At a certain point there is not much more we can do without being able to reproduce the problem directly, since this will require debugging in the browser.

Thanks,

Bryan

--
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/57be3f35-3730-4e9b-8534-2fdd6317cfb1%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/56457A3D.1000903%40gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

I just created this PR to address the merge conflict in #3043.

···

On Saturday, November 14, 2015 at 7:10:18 AM UTC-8, Bryan Van de ven wrote:

Perhaps it might work on this PR that replaces Numeral with Numbro?

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

If so that would be a reason to speed that PR along.

Bryan

On Nov 12, 2015, at 11:50 PM, Sarah Bird [email protected] wrote:

This is a bug. Unfortunately it’s in the upstream library Numeral.js.

I have documented here: https://github.com/bokeh/bokeh/issues/3120

Thanks for finding this Yixin, sorry that doesn’t help with your plot.

On 11/12/15 4:41 PM, Yixin Liu wrote:

Hi Bryan,

The following minimal code will reproduce the issue I am encountered. Note that the tooltips for the upper left point (1, 3) displays correctly while the other two points do not show any tooltips when mouse hover over them. I am sure now it is caused by one of column data is np.nan. For example, the middle point (2, 2) has np.nan in F_LAM column, and the bottom point (3, 1) has np.nan in F_HEX column.

import numpy as np

import bokeh.plotting as bplot

from bokeh.models import ColumnDataSource, HoverTool

bplot.output_file(‘test_hover_float_format’)

TOOLS = “crosshair,pan,box_zoom,reset,tap,previewsave”

colors = [‘#e41a1c’, ‘#377eb8’]

x = [1, 2, 3]

y = [3, 2, 1]

stable_phase = [‘HEX’, ‘HEX’, ‘LAM’]

F = {‘LAM’: [3.28457, np.nan, 2.889993], ‘HEX’: [2.99933, 3.90011, np.nan]}

fill_color = [colors[0], colors[0], colors[1]]

source = ColumnDataSource(dict(x=x, y=y, stable_phase=stable_phase,

                           F_LAM=F['LAM'], F_HEX=F['HEX'],
                           fill_color=fill_color))

raw = bplot.figure(tools=TOOLS, width=450, height=450)

raw.scatter(‘x’, ‘y’, source=source, size=12,

        fill_color=fill_color, line_color=None, name='phase_point')

tooltips1 = [(“phase”, “@stable_phase”),

         ("(x, y)", "(@x{0.00}, @y{0.00})"),
         ("F_LAM", "@F_LAM{0.0000}"),
         ("F_HEX", "@F_HEX{0.0000}"),
         ]

hover1 = HoverTool(tooltips=tooltips1, names=[‘phase_point’],

               mode='mouse', point_policy='snap_to_data')

raw.add_tools(hover1)

bplot.show(raw)

On Thursday, November 12, 2015 at 3:57:58 PM UTC-8, Bryan Van de ven wrote:

Yuxin,

It’s possible you have exposed an unknown bug. I think you are going to have to provide a complete minimal runnable example that demonstrates the problem in order for us to be able to help much more. At a certain point there is not much more we can do without being able to reproduce the problem directly, since this will require debugging in the browser.

Thanks,

Bryan


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/57be3f35-3730-4e9b-8534-2fdd6317cfb1%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/56457A3D.1000903%40gmail.com.

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