apexcharter/man/ax_yaxis2.Rd

34 lines
778 B
Plaintext
Raw Normal View History

2019-07-15 12:04:45 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apex-utils.R
\name{ax_yaxis2}
\alias{ax_yaxis2}
\title{Secondary Y-axis options}
\usage{
ax_yaxis2(ax, ...)
}
\arguments{
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
2019-07-19 14:11:41 +02:00
\item{...}{See arguments from \code{\link{ax_yaxis}}.}
2019-07-15 12:04:45 +02:00
}
\value{
A \code{apexcharts} \code{htmlwidget} object.
}
\description{
Secondary Y-axis options
}
\examples{
library(dplyr)
data("economics_long", package = "ggplot2")
eco <- economics_long \%>\%
filter(variable \%in\% c("pce", "pop")) \%>\%
filter(date >= "2000-01-01")
apex(eco, aes(x = date, y = value, color = variable), type = "line") \%>\%
ax_yaxis(title = list(text = "Pce")) \%>\%
ax_yaxis2(opposite = TRUE, title = list(text = "Pop"))
}