Learn R Programming

plotly (version 3.4.1)

event_data: Access plotly user input event data in shiny

Description

This function must be called within a reactive shiny context.

Usage

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

Arguments

event
The type of plotly event. Currently 'plotly_hover', 'plotly_click', and 'plotly_selected' are supported.
source
Which plot should the listener be tied to? This (character string) should match the value of source in plot_ly.

Examples

Run this code
shiny::runApp(system.file("examples", "events", package = "plotly"))

Run the code above in your browser using DataLab