View source: R/boxGrobs_equalizeWidths.R
| equalizeWidths | R Documentation |
Sets selected boxes to a shared width. This is useful when aligning flowchart levels so corresponding boxes have consistent visual width and center points.
equalizeWidths(x, subelement = NULL, width = NULL)
x |
A list of boxes (or nested lists of boxes). Can also be a single box. |
subelement |
Optional target(s) inside |
width |
Optional width to apply. If |
The updated object with equalized widths.
Other flowchart components:
align(),
append(),
boxGrob(),
boxHeaderGrob(),
boxPropGrob(),
boxShapes,
connectGrob(),
coords(),
distance(),
flowchart(),
insert(),
move(),
moveBox(),
spread()
fc <- flowchart(
groups = list("Group 1", "Group 2"),
groups2 = list("Analysed", "Analysed")
)
fc |>
equalizeWidths(subelement = list(c("groups", 1),
c("groups2", 1),
c("groups", 2),
c("groups2", 2)))
# Global fixed width via explicit argument
fc |> equalizeWidths(subelement = "groups", width = grid::unit(30, "mm"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.