Open
Description
This works:
d <- tibble::tibble(
time = seq(as.Date("2016-01-01"), as.Date("2016-08-31"), by = "days"),
y = rnorm(seq_along(time))
)
plot_ly(d, x = ~time, y = ~y) %>%
add_lines() %>%
rangeslider(start = d$time[5], end = d$time[50])
With ggplotly
start/end are ignored. Why?
p <- d %>% ggplot(aes(x = time, y = y)) +
geom_line()
ggplotly(p, dynamicTicks = T) %>%
rangeslider(start = d$time[5], end = d$time[50])
R version 3.6.0 (2019-04-26)
plotly ‘4.9.0’