Skip to contents

Draws a labelled outline around a group of cards, such as "Needs sign-off". A card joins a zone through its zone column. The map shows the zone notes beside the picture unless stage_map() was given panels = FALSE.

Usage

add_zones(map, zones, ...)

Arguments

map

A stage_map() widget.

zones

A data frame with one row per zone. See "Columns". NULL, or a data frame with no rows (such as data.frame()), adds no zones.

...

Must stay empty. It makes every argument after it a named argument.

Value

The widget, with the zones added. A widget that has zones already is an error of class stagemap_error_layer. A zone of a card that is not in zones, and an id given twice in zones, are errors of class stagemap_error_data that name the ids.

Columns

Required columns are marked with an asterisk.

  • zones: id*, label*, text, note, tone.

Examples

map <- stage_map(
  cards = data.frame(id = "a", label = "Draft", stage = "w", lane = "docs", zone = "sign"),
  stages = data.frame(id = "w", label = "Write"),
  lanes = data.frame(id = "docs", label = "Docs")
) |>
  add_zones(data.frame(id = "sign", label = "Needs sign-off"))
class(map)
#> [1] "stage_map"       "stagemap_widget" "htmlwidget"     
if (FALSE) { # interactive()
map
}