library(apexcharter)
data("economics", package = "ggplot2")
# Not in Shiny so no events
# but you can still select an area on chart
apex(economics, aes(date, psavert), type = "line") %>%
set_input_selection("selection")
# Default selection at start
apex(economics, aes(date, psavert), type = "line") %>%
set_input_selection(
inputId = "selection",
xmin = format_date("1980-01-01"),
xmax = format_date("1985-01-01")
)
Run the code above in your browser using DataLab