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_legend}
|
|
|
|
|
\alias{ax_legend}
|
|
|
|
|
\title{Legend properties}
|
|
|
|
|
\usage{
|
2018-09-03 23:52:53 +02:00
|
|
|
|
ax_legend(ax, show = NULL, position = NULL, horizontalAlign = NULL,
|
2018-07-31 23:24:35 +02:00
|
|
|
|
verticalAlign = NULL, fontSize = NULL, textAnchor = NULL,
|
|
|
|
|
offsetY = NULL, offsetX = NULL, formatter = NULL, labels = NULL,
|
|
|
|
|
markers = NULL, itemMargin = NULL, containerMargin = NULL,
|
|
|
|
|
onItemClick = NULL, onItemHover = NULL, floating = NULL, ...)
|
2018-07-31 22:56:51 +02:00
|
|
|
|
}
|
|
|
|
|
\arguments{
|
|
|
|
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{show}{Logical. Whether to show or hide the legend container.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{position}{Available position options for legend: \code{"top"}, \code{"right"}, \code{"bottom"}, \code{"left"}.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\item{horizontalAlign}{Available options for horizontal alignment: \code{"right"}, \code{"center"}, \code{"left"}.}
|
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{verticalAlign}{Available options for vertical alignment: \code{"top"}, \code{"middle"}, \code{"bottom"}}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{fontSize}{Sets the fontSize of legend text elements}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{textAnchor}{The alignment of text relative to legend’s drawing position}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{offsetY}{Sets the top offset for legend container.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{offsetX}{Sets the left offset for legend container.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{formatter}{JS function. A custom formatter function to append additional text to the legend series names.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{labels}{List with two items \code{"foreColor"} (Custom text color for legend labels)
|
|
|
|
|
and \code{"useSeriesColors"} (Logical, whether to use primary colors or not)}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{markers}{List.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{itemMargin}{List with two items \code{"horizontal"} (Horizontal margin for individual legend item)
|
|
|
|
|
and \code{"vertical"} (Vertical margin for individual legend item).}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{containerMargin}{List with two items \code{"top"} (Top margin for the whole legend container)
|
|
|
|
|
and \code{"left"} (Left margin for the whole legend container).}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{onItemClick}{List with item \code{"toggleDataSeries"}, logical,
|
|
|
|
|
when clicked on legend item, it will toggle the visibility of the series in chart.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{onItemHover}{List with item \code{"highlightDataSeries"}, logical,
|
|
|
|
|
when hovered on legend item, it will highlight the paths of the hovered series in chart.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
2018-07-31 23:24:35 +02:00
|
|
|
|
\item{floating}{Logical. The floating option will take out the legend from the chart area and make it float above the chart.}
|
2018-07-31 22:56:51 +02:00
|
|
|
|
|
|
|
|
|
\item{...}{Additional parameters.}
|
|
|
|
|
}
|
|
|
|
|
\value{
|
|
|
|
|
A \code{apexcharts} \code{htmlwidget} object.
|
|
|
|
|
}
|
|
|
|
|
\description{
|
|
|
|
|
Legend properties
|
|
|
|
|
}
|
2018-09-03 23:52:53 +02:00
|
|
|
|
\note{
|
|
|
|
|
See \url{https://apexcharts.com/docs/options/legend/}
|
|
|
|
|
}
|