Parallel coordinates chart, supports continuous numerical variables and discrete values.

n_parallel_coordinates(
  data,
  variables,
  render = c("svg", "canvas"),
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

data

a data.frame contains value for create the pie

variables

variables configuration.

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.

elementId

element id of widgets

Value

a parallel coordinates component

See also

Examples

library(nivor) # the simplest usage n_parallel_coordinates(data = iris) # generate data set.seed(1) data <- data.frame( temp = round(rexp(32) * 10, 0), cost = round(rexp(32) * 10000, 0), color = sample(c("red", "yellow", "green"), size = 32, replace = TRUE), target = sample(c("A", "B", "C", "D", "E"), size = 32, replace = TRUE), volume = round(rexp(32) * 3, 0) ) # use with default options n_parallel_coordinates(data = data) # customized, only show four series n_parallel_coordinates( data = data, variables = list( list( key = "temp", type = "linear", legend = "Temperature", legendPosition = "start", legendOffset = -20 ), list( key = "cost", type = "linear", legend = "Cost", min = 0, legendOffset = -20 ), list(key = "color", type = "point", padding = 1), list(key = "target", type = "point", values = c("A", "B", "D", "E")) ) )