Change size of chart.

change_size(proxy, width, height)

change_width(proxy, width)

change_height(proxy, height)

Arguments

proxy

A g2r proxy as returned by g2Proxy

width, height

New dimensions of chart.

Examples

library(shiny) ui <- fluidPage( sliderInput("width", "width", min = 100, max = 700, value = 250), g2Output("chart") ) server <- function(input, output) { output$chart <- renderG2({ g2(cars, asp(speed, dist)) %>% fig_point() }) observeEvent(input$width, { g2Proxy("chart") %>% change_width(input$width) }) }
# NOT RUN { shinyApp(ui, server) # }