Panel widget slider disable scientific notation

Hi everyone,

I have a problem: I have a discrete slider from panel.widgets.DiscreteSlider. Next to the name of the slider the current value is displayed. I want to force this display of value NOT to user scientific notation.

I tired different formatters with the format option of the DiscreteSlider from bokeh.models.formatters (TickFormatter).
Both the BasicTickFormatter(use_scientific=False) as well as the PrintfTickFormatter with correct set power_limit_low and power_limit_high does not work. The format option of the slider just seems to be ignored.

Does anyone have an idea how to fix this and force the formatter to actually ignore the scientific notation?

You should open an issue on panel,
the behavior should be consistent between FloatSlider and DiscretSlider:
In one case we have to set the formatter option (wich accept only string)
in the other case the format parameter accept bokeh formatter objects and string (but not in the same way)

1 Like

Thanks for your reply @xavArtley!

I will consider creating an issue on github.
And your solution actually works. Thank you!

1 Like