Skip to contents

The seam between convenient input and a complete, validated object. Every argument is optional, which is what lets the published schema require nothing.

Usage

setup_SankeyConfig(
  source = "source",
  target = "target",
  value = "value",
  orient = "horizontal",
  node_align = NULL,
  node_width = NULL,
  node_gap = NULL,
  palette = NULL,
  title = NULL,
  dat_path = NULL,
  origin = NULL,
  writer = NULL
)

Arguments

source

Character: Column naming each link's source node.

target

Character: Column naming each link's target node.

value

Character: Column holding each link's magnitude.

orient

Character {"horizontal", "vertical"}: Layout direction.

node_align

Optional Character {"left", "right", "justify"}: How nodes are aligned along the flow.

node_width

Optional Numeric [0, Inf): Node thickness in pixels.

node_gap

Optional Numeric [0, Inf): Gap between nodes in pixels.

palette

Optional Character: Node colors, overriding the theme palette for this chart. NULL uses the theme's.

title

Optional Character: Chart title. Declared here because it is the one property every chart type has; palette is not (four take a colormap instead), and axis labels and margins are cartesian-only.

dat_path

Optional Character: Path to the data, read at draw time. The serializable alternative to passing data to draw().

origin

Optional Named character: Where each value came from. Normally computed from which arguments were supplied; pass it only when restoring a config that already carries provenance.

writer

Optional Named character: Which interface wrote the config.

Value

SankeyConfig object.

Author

EDG

Examples

links <- data.frame(
  source = c("a", "b"),
  target = c("c", "c"),
  value = c(1, 2)
)
draw(setup_SankeyConfig(), data = links)