I have a plotly graph created through ggplotly. I am trying to modify the slider to make it a rangeslider similar to the one here .
I know I can achieve something similar with the rangeslider() function, but I would like my range slider to resemble a togglebar, instead of a mini-plot identical to the main plot. Is this is possible? Here is a reproducible example of my plot with a regular slider, any help would be much appreciated!
library(tidyverse)
library(plotly)
dat<- data.frame(y=rnorm(366, mean=100, sd=10),
x=seq(as.Date("2020-01-01"), as.Date("2020-12-31"), by="days"))
p1<- dat %>%
ggplot(aes(x=x, y=y, frame=as.character(x))) +
geom_col(position="dodge2") +
theme_minimal() +
xlab("") + ylab("")
ggplotly(p1, tooltip=c("x", "y"))