[Deprecated]

card_plot_output(
  outputId,
  click = NULL,
  dblclick = NULL,
  hover = NULL,
  brush = NULL,
  height = NULL,
  stretch = TRUE,
  ...
)

Arguments

outputId

output variable to read the plot/image from.

click

This can be NULL (the default), a string, or an object created by the clickOpts() function. If you use a value like "plot_click" (or equivalently, clickOpts(id="plot_click")), the plot will send coordinates to the server whenever it is clicked, and the value will be accessible via input$plot_click. The value will be a named list with x and y elements indicating the mouse position.

dblclick

This is just like the click argument, but for double-click events.

hover

Similar to the click argument, this can be NULL (the default), a string, or an object created by the hoverOpts() function. If you use a value like "plot_hover" (or equivalently, hoverOpts(id="plot_hover")), the plot will send coordinates to the server pauses on the plot, and the value will be accessible via input$plot_hover. The value will be a named list with x and y elements indicating the mouse position. To control the hover time or hover delay type, you must use hoverOpts().

brush

Similar to the click argument, this can be NULL (the default), a string, or an object created by the brushOpts() function. If you use a value like "plot_brush" (or equivalently, brushOpts(id="plot_brush")), the plot will allow the user to "brush" in the plotting area, and will send information about the brushed area to the server, and the value will be accessible via input$plot_brush. Brushing means that the user will be able to draw a rectangle in the plotting area and drag it around. The value will be a named list with xmin, xmax, ymin, and ymax elements indicating the brush area. To control the brush behavior, use brushOpts(). 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.

height

height in valid css units (see htmltools::validateCssUnit() for more details.) Most use-cases will leave this unset and the plot will fill the card as best it can.

stretch

Set to TRUE if this card_body is eager to use any extra vertical space is available in the card.

...

Named arguments become attributes on the div containing the plot.

Details

No longer necessary. Use plain shiny::plotOutput() wrapped with bslib::card_body().

See also

grid_card_plot() for a simpler way of placing just a plot on the grid