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

band

Confidence bands


Description

Add confidence bands

Usage

e_band(
  e,
  min,
  max,
  stack = "confidence-band",
  symbol = c("none", "none"),
  areaStyle = list(list(color = "rgba(0,0,0,0)"), list()),
  legend = list(FALSE, FALSE),
  ...
)

e_band_(
  e,
  min,
  max,
  stack = "confidence-band",
  symbol = c("none", "none"),
  areaStyle = list(list(color = "rgba(0,0,0,0)"), list()),
  legend = list(FALSE, FALSE),
  ...
)

Arguments

e

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

min, max

series.

stack

Name of stack.

symbol

Whether to show symbols on lower and upper band lines.

areaStyle

The style of lower and upper bands, i.e.: color.

legend

Whether to show min and max in legend.

...

All options must be of vectors or lists of length 2 where the first argument is for the lower bound and the second for the upper bound, see examples.

Examples

df <- data.frame(
  x = 1:10,
  y = runif(10, 5, 10)
) %>%
  dplyr::mutate(
    lwr = y - runif(10, 1, 3),
    upr = y + runif(10, 2, 4)
  )

df %>%
  e_charts(x) %>%
  e_line(y) %>%
  e_band(lwr, upr)

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.