Learn R Programming

echarts4r (version 0.1.1)

e_tree: Tree

Description

Build a tree.

Usage

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

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

Arguments

e

An echarts4r object as returned by e_charts.

parent, child

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

https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree

Examples

Run this code
# NOT RUN {
df <- data.frame(
  parent = c("earth","earth","forest","forest","ocean","ocean","ocean","ocean"), 
  child = c("ocean","forest","tree","sasquatch","fish","seaweed","mantis shrimp","sea monster")
)

df %>% 
  e_charts() %>% 
  e_tree(parent, child)

# }

Run the code above in your browser using DataLab