Skip to contents

Draw a Chord chart.

Usage

e_chord(e, source, target, value, rm_x = TRUE, rm_y = TRUE, ...)

e_chord_(e, source, target, value, rm_x = TRUE, rm_y = TRUE, ...)

Arguments

e

An echarts4r object as returned by e_charts or a proxy as returned by echarts4rProxy.

source, target

Source and target columns.

value

Value shared between source and target.

rm_x, rm_y

Whether to remove the x and y axis, defaults to TRUE.

...

Any other option to pass, check See Also section.

Examples

chord_data <- data.frame(
  source = c("a", "b", "c", "d", "c"),
  target = c("b", "c", "d", "e", "e"),
  value = ceiling(rnorm(5, 10, 1)),
  stringsAsFactors = FALSE
)

chord_data |>
  e_charts() |>
  e_chord(source, target, value)