Chord diagram.

n_chord(
  matrix,
  keys,
  render = c("svg", "canvas"),
  ...,
  width = NULL,
  height = NULL,
  element_id = NULL
)

Arguments

matrix

a matrix used to compute the chord diagram.

keys

keys used to identify each cell in the matrix.

render

"svg" (responsive) or "canvas". "canvas" is well suited for large data sets as it does not impact DOM tree depth, however you'll lose the isomorphic rendering ability.

...

additional arguments.

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

element_id

element id of widgets.

Value

a nivo Chord component

See also

Examples

library(nivor) # generate data set.seed(1) data <- matrix(round(rexp(25) * 100, 0), 5, 5) # the simplest use n_chord( matrix = data, keys = c("A", "B", "C", "D", "E") )