Build a treemap.

e_treemap(e, parent, child, value, rm.x = TRUE, rm.y = TRUE, ...)

e_treemap_(e, parent, child, value, rm.x = TRUE, rm.y = TRUE, ...)

Arguments

e

An echarts4r object as returned by e_charts.

parent, child

Edges.

value

Value of edges.

rm.x, rm.y

Whether to remove x and y axis, defaults to TRUE.

...

Any other option to pass, check See Also section.

See also

Examples

df <- data.frame( parent = c("earth", "earth", "earth", "mars", "mars"), child = c("forest", "ocean", "iceberg", "elon", "curiosity"), value = ceiling(rnorm(5, 10, 2)) ) df %>% e_charts() %>% e_treemap(parent, child, value)