[Chartjs]-Chart.js responsive bar chart label sizing

4👍

The problem has more to do with the really long x axis labels than the responsiveness. That said, setting maintainAspectRatio will solve your problem.

Chart.defaults.global.maintainAspectRatio = false;

Note that you can do this per chart too.


If you want to maintain the aspect ratio too, you can extend the chart to trim the labels like in https://stackoverflow.com/a/31699438/360067

Leave a comment