Add an event capture.
Arguments
- e
An
echarts4r
object as returned bye_charts
or a proxy as returned byecharts4rProxy
.- 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
if (FALSE) {
# 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)
}
}