Enables rectangle brush selection on the chart. When a user drags to select a region, the selected data points are available as a reactive input in Shiny or exportable in static HTML.
Arguments
- myIO
an htmlwidget object created by the
myIO()function- direction
brush direction:
"xy"(default),"x", or"y"- on_select
behavior in static mode:
"highlight"(default) or"export"(scopes CSV download to selected points)
Examples
myIO(data = mtcars) |>
addIoLayer(
type = "point", label = "pts",
mapping = list(x_var = "wt", y_var = "mpg")
) |>
setBrush()
