apexcharter/man/ax_colors.Rd

41 lines
819 B
Plaintext
Raw Normal View History

2018-07-31 22:56:51 +02:00
% 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}{An \code{\link[=apexchart]{apexchart()}} \code{htmlwidget} object.}
2018-07-31 22:56:51 +02:00
2020-02-15 13:07:05 +01:00
\item{...}{Colors for the chart's series. When all colors are used, it starts from the beginning.}
2018-07-31 22:56:51 +02:00
}
\value{
An \code{\link[=apexchart]{apexchart()}} \code{htmlwidget} object.
2018-07-31 22:56:51 +02:00
}
\description{
Colors
}
2018-09-03 23:52:53 +02:00
\note{
See \url{https://apexcharts.com/docs/options/colors/}
}
2019-06-24 15:18:38 +02:00
\examples{
data("diamonds", package = "ggplot2")
# Change default color(s)
apex(
2021-01-15 10:53:51 +01:00
data = diamonds,
mapping = aes(x = cut)
2019-06-24 15:18:38 +02:00
) \%>\%
ax_colors("#F7D358")
2019-11-26 10:34:01 +01:00
library(scales)
2019-06-24 15:18:38 +02:00
apex(
2021-01-15 10:53:51 +01:00
data = diamonds,
mapping = aes(x = cut, fill = color)
2019-06-24 15:18:38 +02:00
) \%>\%
2019-11-26 10:34:01 +01:00
ax_colors(brewer_pal(palette = "Set2")(7))
2019-06-24 15:18:38 +02:00
}