Description Usage Arguments Examples
Conceal & reveal figures.
1 2 3 |
proxy |
A g2r proxy as returned by |
figures |
Index of figures to apply the change to. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(shiny)
ui <- fluidPage(
actionButton("hide", "hide"),
actionButton("show", "show"),
g2Output("chart")
)
server <- function(input, output) {
output$chart <- renderG2({
g2(cars, asp(speed, dist)) %>%
fig_point() %>%
fig_line()
})
observeEvent(input$hide, {
g2Proxy("chart") %>%
conceal()
})
observeEvent(input$show, {
g2Proxy("chart") %>%
reveal()
})
}
## Not run: shinyApp(ui, server)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.