1👍
Found the answer – pretty easy one, just set the canvas height and width attributes (NOT CSS parameters) to the required aspect ratio and then it resizes automatically, whilst maintaining the ratio.
- [Chartjs]-ChartJS, Primeng, Gap first and end of line chart
- [Chartjs]-How do I add a title to a chart from chart.js?
Source:stackexchange.com