-
Notifications
You must be signed in to change notification settings - Fork 12k
Description
Expected behavior
I would expect to the chart to use the stepsize as long as possible and shrink the last interval: So if I have a chart with min:0, max:333 and stepSize: 50 it should:
- start from 0
- have ticks every 50 (0, 50, 100, 150, ...) with
- have a smaller interval up to the defined max (250, 300, 333)
Current behavior
For smaller numbers, e.g. min:0, max:333 and stepSize: 50 the charts behaves as I would expect it.
See: https://codepen.io/Pia-Gerhofer/pen/azNPgvm
But If I use bigger numbers with the same ratio: e.g. min: 0, max: 3333 and stepSize: 500 the charts distributes evently with 476,1 without considering my stepsize of 500 (476,1, 952,3, 1428,4, ...) : https://codepen.io/Pia-Gerhofer/pen/LENMKOO
Reproducible sample
https://codepen.io/Pia-Gerhofer/pen/LENMKOO
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
We can't really use suggestedMin/suggestedMax because we want our users to decide which y-axis range they want to see currently and we want control over the stepsize at the same time.
chart.js version
v4.5.1
Browser name and version
Chrome Version 142.0.7444.176
Link to your project
No response