Create a LuminophoR proxy object, which can then be chained
to any of the API functions available (e.g. addWidget
).
luminophorProxy(id, session = shiny::getDefaultReactiveDomain())
id | Name of the LuminophoR htmlwidget |
---|---|
session | Valid session object |
Proxy LuminophoR object
if (interactive()) { library(shiny) library(luminophor) shinyApp( ui = fluidPage( sidebarLayout( sidebarPanel( actionButton('add', 'Add Widgets', icon = icon('plus')) ), mainPanel( luminophorOutput('lmo', height='90vh') ) ) ), server = function(input, output) { output$lmo <- renderLuminophor( luminophor() ) observeEvent(input$add, { luminophorProxy('lmo') %>% addWidget("mywidget") }) } ) }