Theme for charts

ax_theme(ax, mode = c("light", "dark"), palette = NULL,
  monochrome = NULL, ...)

Arguments

ax

A apexcharts htmlwidget object.

mode

use light or dark theme.

palette

Character. Available palettes: "palette1" to "palette10".

monochrome

A list of parameters.

...

Additional parameters.

Value

A apexcharts htmlwidget object.

Note

See https://apexcharts.com/docs/options/theme/

Examples

library(dplyr) data("mpg", package = "ggplot2") data("diamonds", package = "ggplot2") # Dark mode apex( data = count(mpg, manufacturer), mapping = aes(x = manufacturer, y = n) ) %>% ax_theme(mode = "dark") # Use predefined palette (1 to 10) apex( data = count(diamonds, cut, color), mapping = aes(x = color, y = n, fill = cut) ) %>% ax_theme(palette = "palette2") # monochrome palette apex( data = count(diamonds, cut, color), mapping = aes(x = color, y = n, fill = cut) ) %>% ax_theme(monochrome = list(enabled = TRUE, color = "#0B6121"))