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
However, when setting the second argument to false, multiple tests failed as the generated ticks were changed. It seems to me that a whole logic for ticks generation needs to be improved because results are not consistent even if the number of ticks is below maxTicksLimit.
In particular, I don't understand why niceRange is used as the base for calculation at the first place.
Expected Behavior
maxTicksLimit
should limit the number of ticks.Current Behavior
maxTicksLimit
doesn't limit the number of ticks. See https://jsfiddle.net/nagix/x68L9dw3/.Possible Solution
Chart.js/src/scales/scale.linearbase.js
Line 27 in 2388eea
true
, and rounding the first argument inChart.js/src/core/core.helpers.js
Lines 381 to 395 in 2388eea
However, when setting the second argument to
false
, multiple tests failed as the generated ticks were changed. It seems to me that a whole logic for ticks generation needs to be improved because results are not consistent even if the number of ticks is belowmaxTicksLimit
.In particular, I don't understand why
niceRange
is used as the base for calculation at the first place.Chart.js/src/scales/scale.linearbase.js
Line 26 in 2388eea
Context
The same logic is used for a radialLinear scale, and this causes overlaps between tick labels in #5914.
Environment
The text was updated successfully, but these errors were encountered: