Skip to content

Rangeslider start/end do not work with ggplotly #1551

Open
@mgei

Description

@mgei

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’

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions