event_data: Access plotly user input event data in shiny

Description Usage Arguments Author(s) Examples

Description

This function must be called within a reactive shiny context.

Usage

1
2
event_data(event = c("plotly_hover", "plotly_click", "plotly_selected",
  "plotly_relayout"), source = "A")

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 in plot_ly.

Author(s)

Carson Sievert

Examples

1
2
3
4
## Not run: 
shiny::runApp(system.file("examples", "plotlyEvents", package = "plotly"))

## End(Not run)

gvarunkumar/plotly documentation built on May 17, 2019, 9:29 a.m.