2๐
โ
You need to add responsive: false
to you chart configuration
var myChart = new Chart(ctx, {
type: 'line',
data: {
...
},
options: {
responsive: false,
scales: {
...
}
}
});
Otherwise, the chart tries to be as large as its container
Source:stackexchange.com