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_dataLabels}
|
|
|
|
|
\alias{ax_dataLabels}
|
|
|
|
|
\title{Labels on data}
|
|
|
|
|
\usage{
|
|
|
|
|
ax_dataLabels(ax, enabled = NULL, textAnchor = NULL, offsetX = NULL,
|
2018-09-03 23:52:53 +02:00
|
|
|
|
offsetY = NULL, style = NULL, dropShadow = NULL,
|
|
|
|
|
formatter = NULL, ...)
|
2018-07-31 22:56:51 +02:00
|
|
|
|
}
|
|
|
|
|
\arguments{
|
|
|
|
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
|
|
|
|
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\item{enabled}{To determine whether to show dataLabels or not.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\item{textAnchor}{The alignment of text relative to dataLabel’s drawing position.
|
|
|
|
|
Accepted values \code{"start"}, \code{"middle"} or \code{"end"}.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\item{offsetX}{Sets the left offset for dataLabels.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\item{offsetY}{Sets the top offset for dataLabels.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\item{style}{A list of parameters.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\item{dropShadow}{A list of parameters.}
|
|
|
|
|
|
|
|
|
|
\item{formatter}{The formatter function takes in a single value and allows you to format the value before displaying}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
|
|
|
|
\item{...}{Additional parameters.}
|
|
|
|
|
}
|
|
|
|
|
\value{
|
|
|
|
|
A \code{apexcharts} \code{htmlwidget} object.
|
|
|
|
|
}
|
|
|
|
|
\description{
|
|
|
|
|
Labels on data
|
|
|
|
|
}
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\note{
|
|
|
|
|
See \url{https://apexcharts.com/docs/options/datalabels/}
|
|
|
|
|
}
|
2019-06-24 15:18:38 +02:00
|
|
|
|
\examples{
|
|
|
|
|
library(dplyr)
|
|
|
|
|
data("diamonds", package = "ggplot2")
|
|
|
|
|
|
|
|
|
|
# Add data labels
|
|
|
|
|
apex(
|
|
|
|
|
data = count(diamonds, cut),
|
|
|
|
|
mapping = aes(x = cut, y = n)
|
|
|
|
|
) \%>\%
|
|
|
|
|
ax_dataLabels(enabled = TRUE)
|
|
|
|
|
}
|