How to stop legend labels being cut off

I’ve run into an issue where some of my legend labels are being cut off. If I add more labels eventually some appear to the right of the other labels but some still get cut off at the bottom. Help appreciated. Thanks

Hi @Georgia, I think the fix here would be to add padding in the options.layout.padding object.

For example:

...
  options: {
    layout: {
      padding: {
        bottom: 30
      }
    }
...

You’ll have to adjust the value to fit your chart.

If you provide a link to an example in the chart editor I can try troubleshoot this directly.

Is there a way to get the padding to automatically adjust? It would be useful for me to be able to not have to change this number for every chart individually

Not an easy way that I’m aware of, unfortunately :frowning:

In theory that could be done as a Chart.js plugin - but that will involve some Javascript.

1 Like