Reputation: 39
I would like to save an image of a plotly chart to my local hard drive within a react native windows application.
We are currently using plotly within a react-native-webview, not the react-native-plotly library. Plotly has the ability to generate an image file, but I cannot figure out how to get that file from plotly, through the webview, to react-native-fs. Any ideas?
Upvotes: 0
Views: 22
Reputation: 39
Came up with a solution. Plotly's .toImage function generates an image encoded as base64, that can be posted as a message in the webview, which can then be using in react native to write to a file.
Upvotes: 0