| downloadablePlotlyUI {shinydlplot} | R Documentation | 
UI for plotly with download data button in modebar
Description
UI for plotly with download data button in modebar
Usage
downloadablePlotlyUI(id, width = "100%", height = "auto", inline = FALSE)
Arguments
| id | id string that gets namespaced by  | 
| width,height | Must be a valid CSS unit (like  | 
| inline | use an inline ( | 
Value
an HTML tag object corresponding to the UI for downloadablePlotly.
See Also
Examples
library(shiny)
library(shinyjs)
library(shinydlplot)
library(plotly)
ui <- fluidPage(
  useShinyjs(),
  downloadablePlotlyUI(id = 'iris')
)
server <- function(input, output, session) {
  plot <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length)
  callModule(downloadablePlotly,
             id = 'iris',
             plot = plot,
             filename = 'iris.csv',
             content = function(file) {write.csv(iris, file)})
}
## Not run: shinyApp(ui, server)
[Package shinydlplot version 0.1.4 Index]