Colors
ax_colors(ax, ...)
ax | A |
---|---|
... | Colors for the chart's series. When all colors are used, it starts from the beginning. |
A apexcharts
htmlwidget
object.
See https://apexcharts.com/docs/options/colors/
library(dplyr) data("diamonds", package = "ggplot2") # Change default color(s) apex( data = count(diamonds, cut), mapping = aes(x = cut, y = n) ) %>% ax_colors("#F7D358") library(scales) apex( data = count(diamonds, cut, color), mapping = aes(x = cut, y = n, fill = color) ) %>% ax_colors(brewer_pal(palette = "Set2")(7))