3👍
✅
There is an issue in Chart.js about changes on chart.options.aspectRatio
not taken into account. As a workaround, you can edit chart.aspectRatio
directly and then call chart.resize()
.
function setAspectRatio() {
myChart.aspectRatio = 9;
myChart.resize();
}
Source:stackexchange.com