I am using line chart from http://www.chartjs.org/
As you can see max value (130) and min value (60) for Y axis are chosen automatically , I want max value = 500 and min value=0. Is this possible?
In the Format Axis dialog box, click Scale, and under Value axis scale, modify any of the following options: To change the number at which the vertical (value) axis starts or ends, for the Minimum or Maximum option, type a different number in the Minimum box or the Maximum box.
For chart.js V2 (beta), use:
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.
}
}]
}
};
See chart.js documentation on linear axes configuration for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With