Skip to contents

Experimental. Set the shadshiny categorical colors and tokenised text on an echarts4r chart. A text style already set on the chart, such as its font family, is kept; only its color changes. Requires echarts4r.

Usage

shad_theme_echarts4r(e, preset = NULL, dark = FALSE)

Arguments

e

An echarts4r object.

preset

A preset name or shad_current_theme() list.

dark

If TRUE, use dark-mode colors.

Value

The modified echarts4r object.

Examples

if (requireNamespace("echarts4r", quietly = TRUE)) {
  chart <- echarts4r::e_charts(mtcars, wt)
  chart <- echarts4r::e_scatter(chart, mpg)
  chart <- shad_theme_echarts4r(chart, preset = "blue")
}