2👍
✅
Scales should be placed inside options in the json like in this example:
https://jsfiddle.net/52afmcej/
options: {
scales: {
yAxes: [{
ticks: {
min: 0,
max: 600,
}
}]
}
}
Hope this helps 🙂
3👍
Updated to Chart.js v3.2.0
In latest version of Chart.js v3.xx (which is not backwards compatible with v2.xx) you would have to place the min: 0
and max: 600
outside the ticks object:
options: {
scales: {
y: {
min: 0,
max: 600,
ticks: {
// min max not inside here anymore
}
}
}
}
Source: https://www.chartjs.org/docs/latest/axes/cartesian/linear.html#step-size
Source:stackexchange.com