How to position a pie chart

When working with the pie chart, the chart itself seems to be always positioned in the center. I have a legend that contains long labels that then end up covering the chart, when there’s still a lot of whitespace on the left that is not used. I’ve tried positioning the pie-chart more to the left by altering the margins, but without luck.

Here’s a code pen example that shows the problem:

https://codepen.io/themarty/pen/EBwqEO

How can the chart be moved to the left?

You can try shortening the pie’s domain.x as in: https://codepen.io/etpinard/pen/eweEJE

Moreover, note that layout.margin.l cannot be negative.

Ahh…I assumed it would be controlled by a layout property. That’s why I couldn’t find it :slight_smile:

Yeah, I already noticed that negative margins didn’t have any effect (or at least not the intended effect), but I decided to include it, in case I did something wrong.

Thank you so much!

1 Like