Here is a minimum working example:
library(tidyverse)
library(dplyr)
library(plotly)
x_val=c(as.Date("2015-01-01"), as.Date("2016-01-01"), as.Date("2017-01-01"), as.Date("2018-01-01"))
y_val= c(1,2,3,4)
fig <- plot_ly(
x = x_val, y = y_val, type = "scatter", mode = "lines") %>% layout(xaxis = list(
rangeslider = list(type = "date", tick0 = "2015-01-01", dtick="M6", showticklabels=TRUE, showticks=TRUE )
))
fig
If you run it, you'll see that the slider below the figure does not have any ticks; According to the documentation
https://plotly.com/r/reference/#layout-xaxis-rangeslider
ticks should be possible, because there are many tick options like dtick, tick0 etc specifically for rangeslider - nevertheless, it is not working; I saw this question:
r - show ticks for rangeslider (plotly)
which basically asks the same questions, which, however, has no replies or solutions