data("mpg", package = "ggplot2")
# Hide tooltip
apex(
data = mpg,
mapping = aes(x = manufacturer, fill = year)
) %>%
ax_tooltip(enabled = FALSE)
# Share between series
apex(
data = mpg,
mapping = aes(x = manufacturer, fill = year)
) %>%
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")
)
Run the code above in your browser using DataLab