12π
β
To start the y-axis from 0
, you would have to set the beginAtZero
property to true
for y-axis ticks, in your chart options, like so :
options={{
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}}
see β working demo
0π
You need to add this piece of code to the dataset object
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
}
}]
}
}
You can read more in the docs Axes Range setting
Source:stackexchange.com