if (FALSE) {
# ui
rAmChartsExportServerUI("export_server_graphs")
# server
mult_amgraph <- reactive({
if(input$goSave > 0){
isolate({
list(
list(graph = amPie(data = data_pie), name = "pie.jpg", height = "200px", width = "300px"),
list(graph = amBarplot(x = "country", y = "visits", data = data_bar, main = "example") %>%
setExport(), name = "bar.jpg", height = "600px")
)
})
} else {
NULL
}
})
callModule(rAmChartsExportServer, "export_server_graphs", mult_amgraph,
reactive("/home/benoit/amchart_export"))
}
Run the code above in your browser using DataLab