-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
Milestone
Description
Hey guys, I want to make the y axis ticks be in the step size of the max value (e.g. if the max value is 10, the ticks are 0, 2.5, 5, 7.5, 10). However it's rounding up and I'm not sure how to prevent that. Option used:
Expected Behavior
Steps to have decimal values: [0, 2.5, 5, 7.5, 10]
Current Behavior
Steps get rounded up to : [0, 3, 5, 8, 10].
Steps to Reproduce (for bugs)
- Make sample chart with any data and use the following scale option:
scales: { yAxes: [{ ticks: { min: 0, max: 10, stepSize: 2.5, display: true, beginAtZero: true } }] }
Context
I want to be able to set the step size to any value I want and be able to scale properly. Currently when it automatically rounds up, it looks off and it's not the result I want anyway.
Environment
- Chart.js version: 2.6
- Browser name and version: Nodejs 9
paviad and V-Mario