Learn R Programming

echarts4r (version 0.1.1)

e_sunburst: Sunburst

Description

Build a sunburst.

Usage

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

e_sunburst_(e, parent, child, value, itemStyle = NULL, rm.x = TRUE, rm.y = TRUE, ...)

Arguments

e

An echarts4r object as returned by e_charts.

parent, child

Edges.

value

Name of column containing values.

itemStyle

Name of column containing styles to pass to child, expects a data.frame or a list.

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-sunburst

Examples

Run this code
# NOT RUN {
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_sunburst(parent, child, value) %>% 
  e_theme("westeros")

# }

Run the code above in your browser using DataLab