Learn R Programming

echarts4r (version 0.5.0)

e_chord: Chord

Description

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.

See Also

Examples

Run this code
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)

Run the code above in your browser using DataLab