Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

e_capture

Capture event


Description

Add an event capture.

Usage

e_capture(e, event)

Arguments

e

An echarts4r object as returned by e_charts or a proxy as returned by echarts4rProxy.

event

An event name from the event documentation.

Details

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

Examples

## 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
  })
}

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

## End(Not run)

echarts4r

Create Interactive Graphs with 'Echarts JavaScript' Version 5

v0.4.0
Apache License (>= 2.0)
Authors
John Coene [aut, cre, cph], Wei Su [ctb], Helgasoft [ctb], Xianying Tan [ctb] (<https://orcid.org/0000-0002-6072-3521>)
Initial release
2021-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.