e_color: Color

Description Usage Arguments See Also Examples

View source: R/color.R

Description

Customise chart and background colors.

Usage

1
2
3
4
5
6
7
e_color(e, color = NULL, background = NULL, append = TRUE)

## S3 method for class 'echarts4r'
e_color(e, color = NULL, background = NULL, append = TRUE)

## S3 method for class 'echarts4rProxy'
e_color(e, color = NULL, background = NULL, append = TRUE)

Arguments

e

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

color

Vector of colors.

background

Background color.

append

Only applicable to 'echarts4rProxy'. Whether to append the 'color' to the existing array (vector) or colors or to replace it.

See Also

e_theme, Official color documentation, Official background documentation

Examples

1
2
3
4
5
6
7
8
mtcars |>
  e_charts(drat) |>
  e_line(mpg) |>
  e_area(qsec) |>
  e_color(
    c("red", "blue"),
    "#d3d3d3"
  )

JohnCoene/echarts4 documentation built on July 27, 2021, 5:20 p.m.