Add a histogram or density plots.

e_histogram(e, serie, breaks = "Sturges", name = NULL, legend = TRUE,
  bar.width = "99%", x.index = 0, y.index = 0, ...)

e_density(e, serie, breaks = "Sturges", name = NULL, legend = TRUE,
  x.index = 0, y.index = 0, ...)

e_histogram_(e, serie, breaks = "Sturges", name = NULL,
  legend = TRUE, bar.width = "99%", x.index = 0, y.index = 0, ...)

e_density_(e, serie, breaks = "Sturges", name = NULL, legend = TRUE,
  x.index = 0, y.index = 0, ...)

Arguments

e

An echarts4r object as returned by e_charts.

serie

Column name of serie to plot.

breaks

Passed to hist.

name

name of the serie.

legend

Whether to add serie to legend.

bar.width

Width of bars.

x.index

Indexes of x and y axis.

y.index

Indexes of x and y axis.

...

Any other option to pass, check See Also section.

Examples

mtcars %>% e_charts() %>% e_histogram(mpg, name = "histogram") %>% e_density(mpg, areaStyle = list(opacity = .4), smooth = TRUE, name = "density", y.index = 1) %>% e_tooltip(trigger = "axis")