HoverTool showing half the expected y-value

Like the title says, I’m only seeing half of the expected y-value in hovertools, despite the bar showing the true value:

Here is my code:

from bokeh.charts import Bar, show
from bokeh.models import HoverTool
from bokeh.models.ranges import FactorRange
from bokeh.io import output_notebook
output_notebook()

zip_counts = pd.DataFrame(df.zipcode.value_counts())

hover = HoverTool(tooltips=[
        ('Count', "@y")
    ])

p = Bar(zip_counts, title="abc", width=800, tools=[hover])
p.x_range = FactorRange(factors=zip_counts.index.tolist())

show(p)

``

Data sample:

index zipcode
10019   3414
10003   3196
10001   2719
10011   2561
10014   2523
10002   2486
10036   2451
10009   2282
10013   1822
10012   1641
10018   1575

I know those column headers are counterintuitive but please look beyond it for now

Seems like a bug, can you file an issue on GitHub with this information?

Bryan

···

On May 12, 2016, at 18:45, [email protected] wrote:

Like the title says, I’m only seeing half of the expected y-value in hovertools, despite the bar showing the true value:

Here is my code:

from bokeh.charts import Bar, show
from bokeh.models import HoverTool
from bokeh.models.ranges import FactorRange
from bokeh.io import output_notebook
output_notebook()

zip_counts = pd.DataFrame(df.zipcode.value_counts())

hover = HoverTool(tooltips=[
        ('Count', "@y")
    ])

p = Bar(zip_counts, title="abc", width=800, tools=[hover])
p.x_range = FactorRange(factors=zip_counts.index.tolist())

show(p)

``

Data sample:

index zipcode
10019   3414
10003   3196
10001   2719
10011   2561
10014   2523
10002   2486
10036   2451
10009   2282
10013   1822
10012   1641
10018   1575

I know those column headers are counterintuitive but please look beyond it for now

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/7b8fc16f-c235-4e7a-89bc-96c02c65bf4e%40continuum.io.

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

Nevermind, I’m just an idiot and didn’t read far enough in this post. Needed to use @height, not @y

Great, yes, bar does a lot of data manipulation behind the scene.

···

On 5/12/16 10:56 AM,
wrote:

[email protected]

Nevermind, I’m just an idiot and didn’t read far enough
in this post
. Needed to use @height, not @y

  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/7993488a-6b35-4864-9214-6f565dec7a67%40continuum.io?utm_medium=email&utm_source=footer)      .

For more options, visit .


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)

https://groups.google.com/a/continuum.io/d/msgid/bokeh/7993488a-6b35-4864-9214-6f565dec7a67%40continuum.io
https://groups.google.com/a/continuum.io/d/optout