ax_colors: Colors

Description Usage Arguments Value Note Examples

View source: R/apex-utils.R

Description

Colors

Usage

1

Arguments

ax

A apexcharts htmlwidget object.

...

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

Value

A apexcharts htmlwidget object.

Note

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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))

Example output

Warning message:
In make_series(mapdata, mapping, type, serie_name) :
  apex: all groups must have same length! You can use `tidyr::complete` for this.

apexcharter documentation built on May 11, 2021, 5:05 p.m.