[Chartjs]-Chart.js Doughnut Chart Sizing

16👍

Set aspectRatio: 1 in the options object provided to Chart.js to get what you’re looking for. The default aspectRatio is 2 in the current version (there was a time when it was 1, but that was reverted to improve backwards compatibility). As you might guess, setting it to .5 causes the height of the element to be double that of the width.

Codepen (this pen taken from this Github issue)

Leave a comment