Add a custom theme or apply a pre-built one.

e_theme(e, name)

e_theme_custom(e, theme, name = "custom")

e_theme_register(theme, name = "custom")

Arguments

e

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

name

Name of theme.

theme

Theme, A json string or a see below.

Details

The function e_theme_register can be used to register the theme globally in R markdown or shiny (UI). This is useful because 1) the e_theme_custom registers the theme every time and is more computationally expensive.

Functions

  • e_theme - Use a default theme by name.

  • e_theme_custom - Use a custom theme.

  • e_theme_register - Register a theme globally in shiny or R markdown.

Theme names

  • default

  • dark

  • vintage

  • westeros

  • essos

  • wonderland

  • walden

  • chalk

  • infographic

  • macarons

  • roma

  • shine

  • purple-passion

  • halloween

  • auritus

  • azul

  • bee-insipired

  • blue

  • caravan

  • carp

  • cool

  • dark-blue

  • dark-bold

  • dark-digerati

  • dark-fresh-cut

  • dark-mushroom

  • eduardo

  • forest

  • fresh-cut

  • fruit

  • gray

  • green

  • helianthus

  • inspired

  • jazz

  • london

  • macarons

  • macarons2

  • mint

  • red

  • red-velvet

  • royal

  • sakura

  • tech-blue

See also

Examples

mtcars %>% e_charts(mpg) %>% e_line(disp) %>% e_area(hp) %>% e_x_axis(min = 10) -> p p %>% e_theme("chalk") p %>% e_theme_custom('{"color":["#ff715e","#ffaf51"]}')