You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Charts should plot successfully, even when ticks are small
Current Behavior
Currently, under certain circumstances, the tick array generated by Chart.js can include very small numbers instead of zero, due to rounding error. For example, the tick array generated could be [-0.00002, -0.00001, -3.4e-21, 0.000009999].
In this case, the linear formatter will crash, because the argument it passes to toExponential is less than zero.
Possible Solution
A min/max clamp between 0 and 20 is needed for the argument to toExponential, similar to the approach used for toFixed a few lines below.
Steps to Reproduce (for bugs)
Can't seen to coerce the ticks to misbehave in a specific codepen, but it is affecting our software here: carta-frontend/#433
Context
Environment
Chart.js version: 2.80
Browser name and version: Chrome 75
The text was updated successfully, but these errors were encountered:
Expected Behavior
Charts should plot successfully, even when ticks are small
Current Behavior
Currently, under certain circumstances, the tick array generated by Chart.js can include very small numbers instead of zero, due to rounding error. For example, the tick array generated could be
[-0.00002, -0.00001, -3.4e-21, 0.000009999]
.In this case, the linear formatter will crash, because the argument it passes to
toExponential
is less than zero.Possible Solution
A min/max clamp between 0 and 20 is needed for the argument to
toExponential
, similar to the approach used fortoFixed
a few lines below.Steps to Reproduce (for bugs)
Can't seen to coerce the ticks to misbehave in a specific codepen, but it is affecting our software here: carta-frontend/#433
Context
Environment
The text was updated successfully, but these errors were encountered: