chartjs min max code example
Example 1: chart.js y axis maximum value
var options = {
scales: {
yAxes: [{
display: true,
ticks: {
beginAtZero: true, // minimum value will be 0.
// <=> //
min: 0,
max: 10,
stepSize: 1 // 1 - 2 - 3 ...
}
}]
}
};
Example 2: chartjs min
var options = {
scales: {
yAxes: [{
display: true,
ticks: {
suggestedMin: 0, // minimum will be 0, unless there is a lower value.
// OR //
beginAtZero: true // minimum value will be 0.
}
}]
}
};