Clipping legend text for PNG but not always for SVG

So I have a plot that works fine, but the very same code, data and layout produce this when format = png:

and this, when format = svg:

How come the legend is getting clipped for PNG but not for SVG?

EDIT: Another example:

As you can see the second part gets clipped in SVG as well.

Ha. That looks like a bug.

Would you mind sharing the full "data" and "layout" of your graph?

Hi etienne, I’d gladly do but the data is a bit sensitive. I could email it to you personally, if possible. Can you PM me with a mail address I could use?

I’ve send you a PM @etienne :smiley:

Hey @etienne, happy anniversary!

Hi etienne,

I believe I am getting a similar issue when exporting a graph in Chart Studio. If i export a graph as an SVG image the legend text will cut off. I have used one of the legend examples below to demonstrate the problem:

I resized the text to 30, however the same happens if the text is too long. Interestingly this does not happen if I export as a PNG image.

Have I missed something simple? (I am still new to plotly)