I created a chart and it looks like this in browser
But, when I generate image from it, some of legend items are cut off. I tried with different dimensions and both png / jpeg format but result is same. I also try to set different legent attributes (position, orientation, …)
Plotly.toImage(this.element, { format: imageAttribute.format, width: imageAttribute.dimension.width, height: imageAttribute.dimension.height })
.then(base64image => {
this.imageSrc(base64image);
});