apexcharter/man/ax_colors.Rd

42 lines
832 B
R
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apex-utils.R
\name{ax_colors}
\alias{ax_colors}
\title{Colors}
\usage{
ax_colors(ax, ...)
}
\arguments{
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
\item{...}{Colors for the charts series. When all colors are used, it starts from the beginning.}
}
\value{
A \code{apexcharts} \code{htmlwidget} object.
}
\description{
Colors
}
\note{
See \url{https://apexcharts.com/docs/options/colors/}
}
\examples{
library(dplyr)
data("diamonds", package = "ggplot2")
# Change default color(s)
apex(
data = count(diamonds, cut),
mapping = aes(x = cut, y = n)
) \%>\%
ax_colors("#F7D358")
apex(
data = count(diamonds, cut, color),
mapping = aes(x = cut, y = n, fill = color)
) \%>\%
ax_colors(scales::brewer_pal(palette = "Set2")(7))
}