☰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

Spinner widget significant digits

Community Support
_jm
_jm

ENVIRONMENT: bokeh 2.2.3 on Mac OS X and latest version of Google Chrome, i.e. Version 89.0.4389.90 (Official Build) (x86_64)

ISSUE: There is an inconsistency between the configured step size and the displayed value’s significant digits in some use cases. This can be demonstrated by simply using the up/down controls of the widget (i.e. without manually editing the value).

It would be ideal if the Spinner automatically enforced the step-size constraint and its display.

MINIMAL REPRODUCIBLE EXAMPLE: See below. Several clicks up or down from the initial value show the behavior.

from bokeh.models import Spinner
from bokeh.io import show


s = Spinner(
            value=55.000,
            low=0.000,
            high=59.999,
            step=0.001,
            width=100,
            height=50,
            margin=(-5,5,5,5),
            title='Seconds')

show(s)
⌁   Link to post
Bryan
Bryan

So there have been lots of different but related problems with spinners over the years, with different underlying spinner implementations, and for different (mostly tedious) reasons. At this point I am pretty much ready to throw in the towel on trying to make things work automatically nicely for floating point increments. Specifically I think I would just offer an optional property to specify a desired formatter manually, and call it a day. Please feel free to open a GitHub Issue to propose this!

⌁   Link to post
_jm
_jm

Will ultimately get around to proposing a GitHub issue.

For now, confirmed I can handle this efficiently in a client-side CustomJS callback when the value is changed.

⌁   Link to post

End of archived discussion · Replies are disabled