Description Usage Arguments Examples
Capture how users interact with the chart.
1 2 3 4 5 6 |
c |
An object of class |
events |
Events to register in the tooltip ( |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(shiny)
ui <- fluidPage(
charterOutput("chart"),
verbatimTextOutput("ev")
)
server <- function(input, output){
output$chart <- render_charter({
chart(cars, caes(speed, dist)) %>%
c_scatter() %>%
c_events_capture("hover")
})
output$ev <- renderPrint({
input$chart_hovered
})
}
if(interactive())
shinyApp(ui, server)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.