Is it possible to save a plotly graph in Shiny using the downloadHandler?
I know that Shiny supports this for ggplots, see e.g. http://stackoverflow.com/questions/14810409/save-plots-made-in-a-shiny-app
And I’m aware of the plotly_IMAGE() functions, but I get an error:
Error in process.image(struct(resp, "image")) : Unauthorized (HTTP 401).
When I do the following:
output$downloadPlots <- downloadHandler(
filename = function() { paste("test", '.png', sep='') },
content = function(file) {
plotly_IMAGE(patientCircleInput(), format = "png", out_file = file)
}
)
Here patientCircleInput() creates a pie chart that is working.
EDIT:
I now see that it might not be possible using plotly_IMAGE based on this question: http://stackoverflow.com/questions/33998996/exporting-png-files-from-plotly-in-r-without-internet?lq=1
Any inputs are welcome.