Pie chart alignment messed up with legend

I’m using plot.ly to create some pie charts using Javascript, and I’m including a legend for each chart.

I have the chart at the left, and the legend at the right. Now, as long at the text of the legend items are short and roughly the same, this seems to work OK.

However, some of the charts have quite long legend texts - but the chart isn’t moved left to account for the legend; indeed, it seems to the moved to the right, further under the legend :frowning:

The image below shows what I mean:

Annotation%202019-07-26%20165055

Note there is plenty space at the left and right, yet it’s not being used.

Is there some way to get the pie to move left to make space for the legend?

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online