This generates an object representing brushing options, to be passed as the
brush
argument of imageOutput()
or
plotOutput()
.
brushOpts(
id,
fill = "#9cf",
stroke = "#036",
opacity = 0.25,
delay = 300,
delayType = c("debounce", "throttle"),
clip = TRUE,
direction = c("xy", "x", "y"),
resetOnNew = FALSE
)
Input value name. For example, if the value is "plot_brush"
,
then the coordinates will be available as input$plot_brush
. Multiple
imageOutput
/plotOutput
calls may share the same id
value; brushing one image or plot will cause any other brushes with the
same id
to disappear.
Fill color of the brush.
Outline color of the brush.
Opacity of the brush
How long to delay (in milliseconds) when debouncing or throttling, before sending the brush data to the server.
The type of algorithm for limiting the number of brush
events. Use "throttle"
to limit the number of brush events to one
every delay
milliseconds. Use "debounce"
to suspend events
while the cursor is moving, and wait until the cursor has been at rest for
delay
milliseconds before sending an event.
Should the brush area be clipped to the plotting area? If FALSE, then the user will be able to brush outside the plotting area, as long as it is still inside the image.
The direction for brushing. If "xy"
, the brush can be
drawn and moved in both x and y directions. If "x"
, or "y"
,
the brush wil work horizontally or vertically.
When a new image is sent to the browser (via
renderImage()
), should the brush be reset? The default,
FALSE
, is useful if you want to update the plot while keeping the
brush. Using TRUE
is useful if you want to clear the brush whenever
the plot is updated.