1👍
✅
I suppose you’re using Chart.js version 3.
According to the 3.x Migration Guide, the following relevant changes have been made since v2.
scales.[x/y]Axes.ticks.beginAtZero
was renamed toscales[id].beginAtZero
scales.[x/y]Axes.ticks.max
was renamed toscales[id].max
scales.[x/y]Axes.ticks.min
was renamed toscales[id].min
scales.[x/y]Axes.ticks.suggestedMax
was renamed toscales[id].suggestedMax
scales.[x/y]Axes.ticks.suggestedMin
was renamed toscales[id].suggestedMin
Therefore, instead of…
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
suggestedMax: 100
}
}
}
…you now have to define:
scales: {
y: {
beginAtZero: true,
suggestedMax: 100
}
}
Source:stackexchange.com