Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Wrong scaling on parallel graphs

Please visit the graph and click on Python & R tab. The last label, accuracy is 0.004975124262273312 and 0. However, the displays say it was 4.9m and 0m

Not sure if the issue is on my data or not?

Hi @ailab,

The ‘m’ suffix in this case refers to the Scientific Notation ‘milli’ scale factor, which is 1/1000. So 4.9m represents 4.9/1000 is base units. You can control this formatting using the tickformat property of a dimension. Here’s the docstring for tickformat.

Sets the tick label formatting rule using d3 formatting mini-
language which is similar to those of Python.
See https://github.com/d3/d3-format/blob/master/README.md#locale_format

When dealing with numbers this small, it looks like Plotly.js automatically chose the s formatting,

s: decimal notation with an SI prefix, rounded to significant digits.

Hope that helps clear things up a bit!

-Jon

Hi Jon, thank you for the answer and have a nice weekend.