Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

timeline-opts

Timeline


Description

Set timeline options

Usage

e_timeline_opts(e, axis_type = "category", ...)

e_timeline_serie(e, ..., index = 1)

e_timeline_on_serie(e, ..., serie_index)

Arguments

e

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

axis_type

Type of axis, time, value, or category.

...

Named options.

index

The index of the element to apply options to, see examples.

serie_index

The index of the serie to add elements to.

Functions

  • e_timeline_opts: Pass general timeline options, see official documentation.

  • e_timeline_serie: Pass options to each serie, each options must be a vector or list the same length as their are steps, see examples.

  • e_timeline_make: Helper function that wraps your data and e_timeline_serie to dynamically add options to series.

Examples

# general options
iris %>%
  group_by(Species) %>%
  e_charts(Sepal.Length, timeline = TRUE) %>%
  e_line(Sepal.Width) %>%
  e_timeline_opts(
    autoPlay = TRUE,
    rewind = TRUE
  )

# serie options
iris %>%
  group_by(Species) %>%
  e_charts(Sepal.Length, timeline = TRUE) %>%
  e_line(Sepal.Width) %>%
  e_timeline_serie(
    title = list(
      list(text = "setosa"),
      list(text = "versicolor"),
      list(text = "virginica")
    )
  )

echarts4r

Create Interactive Graphs with 'Echarts JavaScript' Version 5

v0.4.0
Apache License (>= 2.0)
Authors
John Coene [aut, cre, cph], Wei Su [ctb], Helgasoft [ctb], Xianying Tan [ctb] (<https://orcid.org/0000-0002-6072-3521>)
Initial release
2021-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.