1
votes

When using chart.js without any width and height set on the canvas element, the resulting pie chart is only 50% the width of the canvas element. This isn't the same for bar charts

enter image description here

Ultimately I want to use the pie chart on a responsive dashboard, but having only 50% of the width occupied is a useless waste of space.

Anyone know how it can occupy 100% of the width?

Cheers

1

1 Answers

-1
votes

Your pie charts creates the biggest circle it possibly can, if you wanted it to fill up your entire rectangle you would need it to print an ellipse. You can either give the circle some more height allowing it to grow, or you can give it less width and put something next to it. I am running into the same problem with aChartEngine in Android.