e_river: River

View source: R/add.R

e_riverR Documentation

River

Description

Build a theme river.

Usage

e_river(e, serie, name = NULL, legend = TRUE, rm_x = TRUE, rm_y = TRUE, ...)

e_river_(e, serie, name = NULL, legend = TRUE, rm_x = TRUE, rm_y = TRUE, ...)

Arguments

e

An echarts4r object as returned by e_charts or a proxy as returned by echarts4rProxy.

serie

Column name of serie to plot.

name

name of the serie.

legend

Whether to add serie to legend.

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

Additional arguments

Examples

dates <- seq.Date(Sys.Date() - 30, Sys.Date(), by = "day")
grps <- lapply(LETTERS[1:3], rep, 31) |> unlist()

df <- data.frame(
  dates = rep(dates, 3),
  groups = grps,
  values = runif(length(grps), 1, 50)
)

df |>
  group_by(groups) |>
  e_charts(dates) |>
  e_river(values) |>
  e_tooltip(trigger = "axis")

echarts4r documentation built on July 9, 2023, 7:26 p.m.