helper function for generating parent values for x or y axis headers
Arguments
- e
An
echarts4robject as returned bye_chartsor a proxy as returned byecharts4rProxy.- axis
which axis the parent should be added
- value
text for the new parent header cell
- children
vector containing values for which current header cells will be children for the new parent cell
- ...
Any other option to pass, check See Also section.
Examples
df <- data.frame("Class" = rep(c("Class1", "Class2", "Class3"),each = 3),
"Grade" = c("Grade1","Grade2", "Grade3"),
"A" = sample(1:10, 9),
"B" = sample(1:10,9))
df |> e_charts() |> e_matrix(xAxis = "Class", yAxis = "Grade") |>
e_matrix_parent(value = "Primary", children = c("Class1", "Class2")) |>
e_matrix_parent(value = "High", children = "Class3")
