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_plotOptions}
|
|
|
|
\alias{ax_plotOptions}
|
|
|
|
\title{Specific options for chart}
|
|
|
|
\usage{
|
|
|
|
ax_plotOptions(ax, bar = NULL, heatmap = NULL, radialBar = NULL,
|
|
|
|
pie = NULL, ...)
|
|
|
|
}
|
|
|
|
\arguments{
|
|
|
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
|
|
|
|
2019-02-17 22:07:04 +01:00
|
|
|
\item{bar}{See \code{\link{bar_opts}}.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
2019-02-17 22:07:04 +01:00
|
|
|
\item{heatmap}{See \code{\link{heatmap_opts}}.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
2019-02-17 22:07:04 +01:00
|
|
|
\item{radialBar}{See \code{\link{radialBar_opts}}.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
2019-02-17 22:07:04 +01:00
|
|
|
\item{pie}{See \code{\link{pie_opts}}.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
|
|
\item{...}{Additional parameters.}
|
|
|
|
}
|
|
|
|
\value{
|
|
|
|
A \code{apexcharts} \code{htmlwidget} object.
|
|
|
|
}
|
|
|
|
\description{
|
|
|
|
Specific options for chart
|
|
|
|
}
|
2019-06-24 15:18:38 +02:00
|
|
|
\examples{
|
|
|
|
library(dplyr)
|
|
|
|
data("diamonds", package = "ggplot2")
|
|
|
|
|
|
|
|
# Stack bar type
|
|
|
|
apex(
|
|
|
|
data = count(diamonds, cut),
|
|
|
|
mapping = aes(x = cut, y = n)
|
|
|
|
) \%>\%
|
|
|
|
ax_plotOptions(
|
|
|
|
bar = bar_opts(endingShape = "rounded", columnWidth = "10\%")
|
|
|
|
)
|
|
|
|
|
|
|
|
# Pie
|
|
|
|
apex(
|
|
|
|
data = count(diamonds, cut),
|
|
|
|
mapping = aes(x = cut, y = n),
|
|
|
|
type = "pie"
|
|
|
|
) \%>\%
|
|
|
|
ax_plotOptions(
|
|
|
|
pie = pie_opts(customScale = 0.5)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Radial
|
|
|
|
apexchart() \%>\%
|
|
|
|
ax_chart(type = "radialBar") \%>\%
|
|
|
|
ax_plotOptions(
|
|
|
|
radialBar = radialBar_opts(
|
|
|
|
hollow = list(size = "70\%")
|
|
|
|
)
|
|
|
|
) \%>\%
|
|
|
|
ax_series(70) \%>\%
|
|
|
|
ax_labels("Indicator")
|
|
|
|
}
|