I’m working with React-Plotly, and I’m trying to figure out how to export toImage, similar to the static export. I noticed in the React-Plotly docs that a
onAfterExport event are emitted, but I can’t seem to figure out how to export the view of a Plotly component. If using download image in the modebar is the only way to do this, there aren’t any event handlers for downloading, like
In addition to exporting the plot as a png, I’m trying to also change the background color during the export process. The plot is currently transparent, but I’m trying to give it a white background in the exported version.
Any help would be greatly appreciated!