12👍
✅
Move the options
part to the Chart creation:
var LineGraph = new Chart(ctx, {
type: 'line',
data: chartdata,
options: {
responsive: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
Here’s an example from the docs.
2👍
options: {
resposive: true,
scales: {
y: {
suggestedMin: 0,
suggestedMax: 100
}
}
}
Source:stackexchange.com