ax_colors: Colors

View source: R/apex-utils.R

ax_colorsR Documentation

Colors

Description

Colors

Usage

ax_colors(ax, ...)

Arguments

ax

An apexchart() htmlwidget object.

...

Colors for the chart's series. When all colors are used, it starts from the beginning.

Value

An apexchart() htmlwidget object.

Note

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

Examples

data("diamonds", package = "ggplot2")

# Change default color(s)
apex(
  data = diamonds,
  mapping = aes(x = cut)
) %>%
  ax_colors("#F7D358")


library(scales)
apex(
  data = diamonds,
  mapping = aes(x = cut, fill = color)
) %>%
  ax_colors(brewer_pal(palette = "Set2")(7))

dreamRs/apexcharter documentation built on March 27, 2024, 7:34 p.m.