apexcharter/man/ax_tooltip.Rd

99 lines
2.3 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_tooltip}
\alias{ax_tooltip}
\title{Tooltip options}
\usage{
2019-11-26 10:17:42 +01:00
ax_tooltip(
ax,
enabled = NULL,
shared = NULL,
followCursor = NULL,
intersect = NULL,
inverseOrder = NULL,
custom = NULL,
fillSeriesColor = NULL,
onDatasetHover = NULL,
theme = NULL,
x = NULL,
y = NULL,
z = NULL,
marker = NULL,
items = NULL,
fixed = 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
\item{enabled}{Logical. Show tooltip when user hovers over chart area.}
\item{shared}{Logical. When having multiple series, show a shared tooltip.}
2020-02-15 13:07:05 +01:00
\item{followCursor}{Logical. Follow user's cursor position instead of putting tooltip on actual data points.}
2018-07-31 22:56:51 +02:00
\item{intersect}{Logical. Show tooltip only when user hovers exactly over datapoint.}
\item{inverseOrder}{Logical. In multiple series, when having shared tooltip, inverse the order of series (for better comparison in stacked charts).}
\item{custom}{JS function. Draw a custom html tooltip instead of the default one based on the values provided in the function arguments.}
\item{fillSeriesColor}{Logical. When enabled, fill the tooltip background with the corresponding series color.}
2018-09-03 23:52:53 +02:00
\item{onDatasetHover}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{theme}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{x}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{y}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{z}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{marker}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{items}{A list of parameters.}
2018-07-31 22:56:51 +02:00
2018-09-03 23:52:53 +02:00
\item{fixed}{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{
Tooltip options
}
2018-09-03 23:52:53 +02:00
\note{
See \url{https://apexcharts.com/docs/options/tooltip/}
}
2019-06-24 15:18:38 +02:00
\examples{
data("mpg", package = "ggplot2")
# Hide tooltip
apex(
2021-01-15 10:53:51 +01:00
data = mpg,
mapping = aes(x = manufacturer, fill = year)
2019-06-24 15:18:38 +02:00
) \%>\%
ax_tooltip(enabled = FALSE)
# Share between series
apex(
2021-01-15 10:53:51 +01:00
data = mpg,
mapping = aes(x = manufacturer, fill = year)
2019-06-24 15:18:38 +02:00
) \%>\%
ax_tooltip(shared = TRUE)
# Fixed tooltip
data("economics", package = "ggplot2")
apex(
data = economics,
mapping = aes(x = date, y = psavert),
type = "line"
) \%>\%
ax_tooltip(
fixed = list(enabled = TRUE, position = "topLeft")
)
}