e_capture: Capture event

Description Usage Arguments Details Examples

View source: R/proxies.R

Description

Add an event capture.

Usage

1
e_capture(e, event)

Arguments

e

An echarts4r object as returned by e_charts.

event

An event name from the event documentation.

Details

Many events can be capture, however not all are integrated, you can pass one that is not implemented with this function.

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

ui <- fluidPage(
  echarts4rOutput("chart"),
  verbatimTextOutput("zoom")
)

server <- function(input, output){
  output$chart <- renderEcharts4r({
    mtcars %>% 
      e_charts(mpg) %>% 
      e_scatter(qsec) %>% 
      e_datazoom() %>% 
      e_capture("datazoom")
  })
  
  output$zoom <- renderPrint({
    input$chart_datazoom
  })
}

shinyApp(ui, server)

## End(Not run)

JohnCoene/echarts4r documentation built on Sept. 18, 2019, 2:24 a.m.