Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug when data is all small numbers #5723

Merged
merged 4 commits into from Sep 16, 2018

Conversation

costerwi
Copy link
Contributor

@costerwi costerwi commented Sep 8, 2018

This fixes #5653 where nothing would be plotted if the tick spacing (increment between tick marks) came out too small such as when all the data is nearly zero as in this example

The proposed change permits plotting of data down to very small values using scientific notation.

Besides the fix, I also added a test which flags the problem.

@simonbrunel simonbrunel merged commit 7a65546 into chartjs:master Sep 16, 2018
@simonbrunel
Copy link
Member

Thanks @costerwi

exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
* Add test for correct handling of small numbers

* Calculate tick precision for arbitrarily small numbers

* Use scientific notation for very small tick numbers

* Calculate significant digits for exponential tick values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Chart is not drawn if values are smaller than 0.000001
3 participants