rAmCharts-shinymodules | R Documentation |
This function need the base64enc
package to save image.
rAmChartsExportServerUI(id) rAmChartsExportServer( input, output, session, list_am_graph, path = shiny::reactive(tempdir()), mode = "single", progress = T, message = "Calculation in progress", detail = "This may take a while..." )
id |
character, used to specify namesapce, see |
input |
standard, |
output |
standard, |
session |
standard, |
list_am_graph |
named list, reactive expression with all amCharts to export
|
path |
character, directory. tempdir() by Defaut |
mode |
character, 'single' : graphics are rendered and saved one by one. 'multiple' all at same time |
progress |
boolean, set a progress bar or not ? |
message |
character, if progress, message. Defaut to "Calculation in progress" |
detail |
character, if progress, detail. Defaut to "This may take a while...' |
a reactive expression
## Not run: # 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")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.