score:1

Accepted answer
library(highcharter)
library(purrr)
library(dplyr)

series_lst <- 
  iris %>% 
  as_tibble() %>% 
  asplit(1) %>% 
  imap(~list(
    name = paste("observation", .y),
    data = as.numeric(.x[1:4]),
    color = "steelblue"
  ))

hc <- 
  highchart() %>% 
  hc_chart(parallelCoordinates = TRUE, type = "spline") %>% 
  hc_xAxis(categories = names(iris)[1:4]) %>% 
  hc_add_series_list(series_lst)

Created on 2021-06-07 by the reprex package (v2.0.0)

enter image description here


Related Articles