event_data
From plotly v4.5.2
by Carson Sievert
Access plotly user input event data in shiny
This function must be called within a reactive shiny context.
Usage
event_data(event = c("plotly_hover", "plotly_click", "plotly_selected",
"plotly_relayout"), source = "A",
session = shiny::getDefaultReactiveDomain())
Arguments
- event
The type of plotly event. Currently 'plotly_hover', 'plotly_click', 'plotly_selected', and 'plotly_relayout' are supported.
- source
Which plot should the listener be tied to? This (character string) should match the value of
source
inplot_ly()
.- session
a shiny session object (the default should almost always be used).
Examples
library(plotly)
# NOT RUN {
shiny::runApp(system.file("examples", "plotlyEvents", package = "plotly"))
# }
Community examples
Looks like there are no examples yet.