☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Hovertools decimals in scientific notation

Community Supporthover
Alejobep
Alejobep

I would like to know how can I set the number of decimal places using scientific notation when I format numbers in Hovertools.

At the moment, if I set hovertools tooltips like (‘value’, ‘@value’) values that are too small are displayed with scientific notation and 3 decimal places. However, if I set tooltips like (‘value’, ‘@value{0.00}’), any value that is smaller than 1e-2, is displayed as zero.

Is there a way to adjust decimal places in scientific notation?

⌁   Link to post
_jm
_jm

@Alejobep

If any of the basic formatting do not meet your requirements, you could consider custom client-side formatting using JavaScript.

See the bokeh reference guide; the CustomJSHover section of the bokeh.models.tools section documents this capability and includes an example.

For your case, you could include logic to use uniform scientific notation everywhere, use mixed scientific notation and fixed-point notation, etc. depending on your preferences/requirements.

⌁   Link to post

End of archived discussion · Replies are disabled