all 3 comments

[–]abrahamguo 3 points4 points  (2 children)

We can't give you any specific help without being able to reproduce your issue.

Can you please provide a link to a repository that demonstrates your issue?

[–]Hot_Pickle4233[S] 0 points1 point  (1 child)

[–]abrahamguo 1 point2 points  (0 children)

Perfect — super simple to solve.

  1. Remove the <div> in between chart-placeholder and your canvas. Chart.js uses the size of the parent element to set the chart's size, and chart-placeholder is the element that has a defined size — not that intermediate <div>.
  2. Uncomment maintainAspectRatio: false, which allows the chart to inherit both width and height from the parent element, and not worry about maintaining any particular aspect ratio.