Secondary Y-axis options
ax_yaxis2(ax, ...)
ax | A |
---|---|
... | See arguments from |
A apexcharts
htmlwidget
object.
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"))