forked from plotly/plotly.R
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent_data.Rd
More file actions
50 lines (47 loc) · 1.7 KB
/
event_data.Rd
File metadata and controls
50 lines (47 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shiny.R
\name{event_data}
\alias{event_data}
\title{Access plotly user input event data in shiny}
\usage{
event_data(event = c("plotly_hover", "plotly_unhover", "plotly_click",
"plotly_doubleclick", "plotly_selected", "plotly_selecting",
"plotly_brushed", "plotly_brushing", "plotly_deselect",
"plotly_relayout", "plotly_restyle", "plotly_legendclick",
"plotly_legenddoubleclick", "plotly_clickannotation",
"plotly_afterplot"), source = "A",
session = shiny::getDefaultReactiveDomain(), priority = c("input",
"event"))
}
\arguments{
\item{event}{The type of plotly event. All supported events are listed in the
function signature above (i.e., the usage section).}
\item{source}{a character string of length 1. Match the value of this string
with the \code{source} argument in \code{\link[=plot_ly]{plot_ly()}} (or \code{\link[=ggplotly]{ggplotly()}}) to respond to
events emitted from that specific plot.}
\item{session}{a shiny session object (the default should almost always be used).}
\item{priority}{the priority of the corresponding shiny input value.
If equal to \code{"event"}, then \code{\link[=event_data]{event_data()}} always triggers re-execution,
instead of re-executing only when the relevant shiny input value changes
(the default).}
}
\description{
This function must be called within a reactive shiny context.
}
\examples{
\dontrun{
plotly_example("shiny", "event_data")
}
}
\references{
\itemize{
\item \url{https://plotly-book.cpsievert.me/shiny-plotly-inputs.html}
\item \url{https://plot.ly/javascript/plotlyjs-function-reference/}
}
}
\seealso{
\link{event_register}, \link{event_unregister}
}
\author{
Carson Sievert
}