powered by
Splits the chart into a grid of panels, one per unique value of the faceting variable. Each panel shows the same layers filtered to that subset of the data.
setFacet( myIO, var, ncol = NULL, min_width = 200, scales = "fixed", label_position = "top" )
Modified myIO widget.
A myIO widget object.
Character. Column name to facet by. Must exist in at least one layer's data.
Integer or NULL. Number of columns in the grid. If NULL, auto-computes from min_width and container width.
min_width
Numeric. Minimum panel width in pixels when ncol is NULL. Default 200.
ncol
Character. Scale sharing mode:
"fixed" -- all panels share x and y scales (default)
"fixed"
"free_x" -- independent x scales per panel
"free_x"
"free_y" -- independent y scales per panel
"free_y"
"free" -- independent x and y scales per panel
"free"
Character. Where to show panel labels: "top" (default) or "bottom".
"top"
"bottom"
myIO(iris) |> addIoLayer("point", label = "pts", mapping = list(x_var = "Sepal.Length", y_var = "Sepal.Width")) |> setFacet("Species", ncol = 3)
Run the code above in your browser using DataLab