Skip to contents

https://echarts.apache.org/en/option.html

Usage

ec_line(df, ...)

Arguments

df

A dataframe that can be referenced via ... arguments

...

Series attributes

Details

Adds option attribute type = "line" and will give an error if y is not provided.

See also

Examples


# Including x-value in series data
data <- tibble::tibble(x = 1:5, y = rnorm(5))
series <- ec_line(data, x, y)

echartr(option = list(
  xAxis = list(type = "value"),
  yAxis = list(type = "value"),
  legend = list(show = TRUE),
  series = series
))
# Including x-value in axis data - requires category type axis data <- tibble::tibble(x = 1:5, y = rnorm(5)) series <- ec_line(data, y) echartr(option = list( xAxis = list(type = "category", data = data$x), yAxis = list(type = "value"), legend = list(show = TRUE), series = series ))