@@ -56,13 +56,16 @@ prepareWidget <- function(x) {
5656# '
5757# ' This function must be called within a reactive shiny context.
5858# '
59- # ' @param event The type of plotly event. Currently 'plotly_hover',
60- # ' 'plotly_click', 'plotly_selected', and 'plotly_relayout' are supported .
59+ # ' @param event The type of plotly event. All supported events are listed in the
60+ # ' function signature above (i.e., the usage section) .
6161# ' @param source a character string of length 1. Match the value of this string
62- # ' with the source argument in [plot_ly()] to retrieve the
63- # ' event data corresponding to a specific plot (shiny apps can have multiple plots) .
62+ # ' with the ` source` argument in [plot_ly()] (or [ggplotly()]) to respond to
63+ # ' events emitted from that specific plot.
6464# ' @param session a shiny session object (the default should almost always be used).
6565# ' @export
66+ # ' @references
67+ # ' * <https://plotly-book.cpsievert.me/shiny-plotly-inputs.html>
68+ # ' * <https://plot.ly/javascript/plotlyjs-function-reference/>
6669# ' @author Carson Sievert
6770# ' @examples \dontrun{
6871# ' plotly_example("shiny", "event_data")
@@ -72,8 +75,8 @@ event_data <- function(
7275 event = c(
7376 " plotly_hover" , " plotly_unhover" , " plotly_click" , " plotly_doubleclick" ,
7477 " plotly_selected" , " plotly_selecting" , " plotly_brush" , " plotly_brushing" ,
75- " plotly_deselect" , " plotly_relayout" , " plotly_legendclick" ,
76- " plotly_legenddoubleclick" , " plotly_afterplot"
78+ " plotly_deselect" , " plotly_relayout" , " plotly_restyle " , " plotly_legendclick" ,
79+ " plotly_legenddoubleclick" , " plotly_clickannotation " , " plotly_afterplot"
7780 ),
7881 source = " A" ,
7982 session = shiny :: getDefaultReactiveDomain()
0 commit comments