Learn R Programming

echarts4r (version 0.1.1)

e_mark_point: Mark point

Description

Mark points and lines.

Usage

e_mark_point(e, serie = NULL, data = NULL, ...)

e_mark_line(e, serie = NULL, data = NULL, ...)

e_mark_area(e, serie = NULL, data = NULL, ...)

Arguments

e

An echarts4r object as returned by e_charts.

serie

Serie to mark on passed to grep, defaults to last added.

data

Placement.

...

Any other option to pass, check See Also section.

See Also

https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint, https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine

Examples

Run this code
# NOT RUN {
max <- list(
  name = "Max",
  type = "max"
)

min <- list(
  name = "Min",
  type = "min"
)

avg <- list(
  type = "average",
  name = "AVG"
)

USArrests %>% 
  e_charts(Murder) %>% 
  e_line(Rape) %>% 
  e_line(UrbanPop) %>% 
  e_mark_point(data = max) %>% 
  e_mark_point(data = min) %>% 
  e_mark_line(serie = "Rape", data = avg) %>% 
  e_mark_area(serie = "Rape", data = list(
    list(xAxis = "min", yAxis = "min"), 
    list(xAxis = "max", yAxis = "max"))
 )

# }

Run the code above in your browser using DataLab