mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-03 11:15:07 -05:00
63 lines
2.5 KiB
R
63 lines
2.5 KiB
R
% Generated by roxygen2 (4.0.2): do not edit by hand
|
|
\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()}.}
|
|
|
|
\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")
|
|
)
|
|
}
|
|
|