1👍
Set the stepsize parameter in the tick configuration object.
Example:
let options = {
scales: {
yAxes: [{
ticks: {
max: 5,
min: 0,
stepSize: 1
}
}]
}
};
Should yield [0, 1, 2, 3, 4, 5].
- Chartjs-Why is the data from my API not displaying on my chart.js chart in React?
- Chartjs-Chart.js canvas resize of pie / doughnut chart
Source:stackexchange.com