Skip to contents

Generates the flowchart

Usage

ggflowchart(
  data,
  node_data = NULL,
  fill = "white",
  colour = "black",
  text_colour = "black",
  arrow_colour = "black",
  family = "sans",
  x_nudge = 0.35,
  y_nudge = 0.25
)

Arguments

data

Data frame or tibble of edges. Must have two columns, first column are "from" node names, second column is "to" node names. Node names must be unique.

node_data

Data frame or tibble of node information. Must have at least one column called "name" for node names to join by. Default NULL.

fill

Fill colour of nodes. Must be a valid colour name or hex code. Default "white".

colour

Outline colour of nodes. Must be a valid colour name or hex code. Default "black".

text_colour

Colour of labels in nodes. Must be a valid colour name or hex code. Default "black".

arrow_colour

Colour of arrows. Must be a valid colour name or hex code. Default "black".

family

Font family for node labels. Default "sans"

x_nudge

Distance from centre of edge of node box in x direction. Default 0.35.

y_nudge

Distance from centre of edge of node box in y direction. Default 0.25.

Value

A ggplot2 object.

Examples

data <- tibble::tibble(from = c("A", "A", "A", "B", "C", "F"), to = c("B", "C", "D", "E", "F", "G"))
ggflowchart(data)