Learn R Programming

apexcharter (version 0.4.4)

ax_colors: Colors

Description

Colors

Usage

ax_colors(ax, ...)

Value

An apexchart()

htmlwidget object.

Arguments

ax

An apexchart() htmlwidget object.

...

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

Examples

Run this code
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))

Run the code above in your browser using DataLab