apexcharter/man/ax_fill.Rd

79 lines
1.6 KiB
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_fill}
\alias{ax_fill}
\title{Fill property}
\usage{
2019-11-26 10:17:42 +01:00
ax_fill(
ax,
type = NULL,
colors = NULL,
opacity = NULL,
gradient = NULL,
image = NULL,
pattern = NULL,
...
)
2018-07-31 22:56:51 +02:00
}
\arguments{
\item{ax}{An \code{\link[=apexchart]{apexchart()}} \code{htmlwidget} object.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{type}{Whether to fill the paths with solid colors or gradient.
Available options: \code{"solid"}, \code{"gradient"}, \code{"pattern"} or \code{"image"}.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{colors}{Colors to fill the svg paths..}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{opacity}{Opacity of the fill attribute.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{gradient}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{image}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{pattern}{A list of parameters.}
2018-07-31 22:56:51 +02:00
\item{...}{Additional parameters.}
}
\value{
An \code{\link[=apexchart]{apexchart()}} \code{htmlwidget} object.
2018-07-31 22:56:51 +02:00
}
\description{
Fill property
}
2018-09-03 23:52:53 +02:00
\note{
See \url{https://apexcharts.com/docs/options/fill/}
}
2019-06-24 15:18:38 +02:00
\examples{
data("diamonds", package = "ggplot2")
# Use a pattern to fill bars
apex(
2021-01-15 10:53:51 +01:00
data = diamonds,
mapping = aes(x = color, fill = cut)
2019-06-24 15:18:38 +02:00
) \%>\%
ax_fill(
type = "pattern",
opacity = 1,
pattern = list(
style = c("circles", "slantedLines", "verticalLines", "horizontalLines", "squares")
)
)
data("economics", package = "ggplot2")
# Customise gradient
apex(
data = economics,
mapping = aes(x = date, y = psavert),
type = "area"
) \%>\%
ax_fill(gradient = list(
enabled = TRUE,
shadeIntensity = 1,
inverseColors = FALSE,
opacityFrom = 0,
opacityTo = 1,
stops = c(0, 2000)
))
}