Disable scientific notation in hover tool Bokeh
Asked Answered
H

2

5

It seems like there are plenty of answers on how to disable the scientific notation in Bokeh on numbers displayed on x and y axis. But how about disabling it for the hover tool?

Hospodar answered 1/3, 2017 at 15:51 Comment(0)
H
8

Found it, at least for my particular case it was sufficient to force the hover tool to read it as an integer:

hover.tooltips = [("Date", "@Date"),  ("Volume", "@z{int}")]
Hospodar answered 1/3, 2017 at 16:3 Comment(1)
Hi, if that solved the problem you should accept you own answer, see stackoverflow.com/help/self-answerLucania
A
0

Suppress the scientific notation by making the hover tool read the particular variable as a number with predetermined decimal digits by adding {1,11...} next to the variable name.

In this case it is 2 digits for volume:

hover.tooltips = [("Date", "@Date"),  ("Volume", "@volume{1,11}")]
Adrenocorticotropic answered 17/5, 2022 at 16:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.