e_draw_p: Draw

Description Usage Arguments Details Examples

View source: R/proxies.R

Description

Draw the chart.

Usage

1
e_draw_p(proxy)

Arguments

proxy

An echarts4r proxy as returned by echarts4rProxy.

Details

Useful if you set draw to FALSE in e_charts.

Examples

 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
## Not run: 
library(shiny)

ui <- fluidPage(
  echarts4rOutput("chart"),
  actionButton("draw", "draw")
)

server <- function(input, output) {
  output$chart <- renderEcharts4r({
    mtcars |>
      e_charts(mpg, draw = FALSE) |>
      e_scatter(qsec) |>
      e_datazoom()
  })

  observeEvent(input$draw, {
    echarts4rProxy("chart") |>
      e_draw_p()
  })
}

if (interactive()) {
  shinyApp(ui, server)
}

## End(Not run)

JohnCoene/echarts4 documentation built on July 27, 2021, 5:20 p.m.