e_step: Step

View source: R/add.R

e_stepR Documentation

Step

Description

Add step serie.

Usage

e_step(
  e,
  serie,
  bind,
  step = c("start", "middle", "end"),
  fill = FALSE,
  name = NULL,
  legend = TRUE,
  y_index = 0,
  x_index = 0,
  coord_system = "cartesian2d",
  ...
)

e_step_(
  e,
  serie,
  bind = NULL,
  step = c("start", "middle", "end"),
  fill = FALSE,
  name = NULL,
  legend = TRUE,
  y_index = 0,
  x_index = 0,
  coord_system = "cartesian2d",
  ...
)

Arguments

e

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

serie

Column name of serie to plot.

bind

Binding between datasets, namely for use of e_brush.

step

Step type, one of start, middle or end.

fill

Set to fill as area.

name

name of the serie.

legend

Whether to add serie to legend.

x_index, y_index

Indexes of x and y axis.

coord_system

Coordinate system to plot against.

...

Any other option to pass, check See Also section.

See Also

Additional arguments

Examples

USArrests |>
  tibble::rownames_to_column("State") |>
  e_charts(State) |>
  e_step(Murder, name = "Start", step = "start", fill = TRUE) |>
  e_step(Rape, name = "Middle", step = "middle") |>
  e_step(Assault, name = "End", step = "end") |>
  e_tooltip(trigger = "axis")

# timeline
iris |>
  group_by(Species) |>
  e_charts(Sepal.Length, timeline = TRUE) |>
  e_step(Sepal.Width) |>
  e_tooltip(trigger = "axis")

JohnCoene/echarts4r documentation built on Feb. 23, 2024, 9:21 a.m.