helper function for adding data to the corner of matrix
Usage
e_matrix_corner(
e,
coord = c(-1, -1),
value,
mergeCells = TRUE,
coordClamp = FALSE,
...
)Arguments
- e
An
echarts4robject as returned bye_chartsor a proxy as returned byecharts4rProxy.- coord
corner cell coordinate location
- value
text to display in corner cell
- mergeCells
whether the body cells and corner cells can be merged
- coordClamp
determines whether null values can be used to indicate an entire row/column
- ...
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") |>
e_matrix_corner(value = "All School",
label = list(fontSize = 24, color = "#555", position = "inside"))
