0👍
If you open up your browser’s dev tools, in the console it’s likely you would see this error:
Invalid scale configuration for scale: yAxes
At least that’s what I see when trying to use your options
object. This tells us that we’ve not written the scales
property correctly. Looking at the chart.js documentation, we see that scales
is always an object, not an array of objects. Also based on your requirements it sounds like you would want to set max
instead of maxTicksLimit
which means you should write an options object like this:
options: {
scales: {
yAxes: {
display: true,
max: 45,
ticks: {
stepSize: 15
}
}
}
}
- Chartjs-Chart.js. Edit bar width -v2.5-
- Chartjs-How do I make the legends tab focusable in a chart.js Line chart using React.js?
Source:stackexchange.com