forked from sallyblockchain/shiny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotOutput.Rd
65 lines (58 loc) · 2.65 KB
/
plotOutput.Rd
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/bootstrap.R
\name{plotOutput}
\alias{plotOutput}
\title{Create an plot output element}
\usage{
plotOutput(outputId, width = "100\%", height = "400px", clickId = NULL,
hoverId = NULL, hoverDelay = 300, hoverDelayType = c("debounce",
"throttle"), inline = FALSE)
}
\arguments{
\item{outputId}{output variable to read the plot from}
\item{width,height}{Plot width/height. Must be a valid CSS unit (like
\code{"100\%"}, \code{"400px"}, \code{"auto"}) or a number, which will be
coerced to a string and have \code{"px"} appended. These two arguments are
ignored when \code{inline = TRUE}, in which case the width/height of a plot
must be specified in \code{renderPlot()}. Note that, for height, using
\code{"auto"} or \code{"100\%"} generally will not work as expected, because
of how height is computed with HTML/CSS.}
\item{clickId}{If not \code{NULL}, the plot will send coordinates to the
server whenever it is clicked. This information will be accessible on the
\code{input} object using \code{input$}\emph{\code{clickId}}. The value
will be a named list or vector with \code{x} and \code{y} elements
indicating the mouse position in user units.}
\item{hoverId}{If not \code{NULL}, the plot will send coordinates to the
server whenever the mouse pauses on the plot for more than the number of
milliseconds determined by \code{hoverTimeout}. This information will be
accessible on the \code{input} object using
\code{input$}\emph{\code{clickId}}. The value will be \code{NULL} if the
user is not hovering, and a named list or vector with \code{x} and \code{y}
elements indicating the mouse position in user units.}
\item{hoverDelay}{The delay for hovering, in milliseconds.}
\item{hoverDelayType}{The type of algorithm for limiting the number of hover
events. Use \code{"throttle"} to limit the number of hover events to one
every \code{hoverDelay} milliseconds. Use \code{"debounce"} to suspend
events while the cursor is moving, and wait until the cursor has been at
rest for \code{hoverDelay} milliseconds before sending an event.}
\item{inline}{use an inline (\code{span()}) or block container (\code{div()})
for the output}
}
\value{
A plot output element that can be included in a panel
}
\description{
Render a \link{renderPlot} within an application page.
}
\note{
The arguments \code{clickId} and \code{hoverId} only work for R base
graphics (see the \pkg{\link{graphics}} package). They do not work for
\pkg{\link[grid:grid-package]{grid}}-based graphics, such as \pkg{ggplot2},
\pkg{lattice}, and so on.
}
\examples{
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
}