I checked several posts. However none of the solution solved my issue.
It's a quite standard usage of min and max. I use the same setting in Barchart and it worked. not working in line chart on the same page.
I tried with suggestedMax, suggestedMin as well.
By the way, my dataset has multiple line series.
version 2.1.6
var ctx = document.getElementById(canvas);
var lineChart = new Chart(ctx, {
type: 'line',
data: lineChartData,
option: {
scales: {
yAxes: [ {
// type: 'linear',
ticks: {
beginAtZero: true,
max : 50,
min : 0,
}
} ]
}
}
Then I tried a piece of code from another post...not working....
var data = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "Test dataset",
fill: false,
data: [65, 59, 80, 81, 56, 55, 40],
}
]
};
var ctx = document.getElementById("testLineChart");
var myLineChart = new Chart(ctx, {
type: 'line',
data: data,
option: {
scales: {
yAxes: [ {
type: 'linear',
ticks: {
beginAtZero: true,
min : 0,
max : 100,
}
} ]
}
}
});