I didn't find any information if multiple level x axis are available for plotly. I guess it is possible to do it in ggplot2 (eg. this SO thread) and then transform it with ggplotly()
but I would prefer a plotly solution. Is this possible? At the moment I am using an auxiliary column which concatenates year and month to the format "2017-12".
Example dataset:
data.frame(
year = c(2017, 2018, 2018, 2017, 2018, 2018),
month = c(12, 1, 2, 12, 1, 2),
value = c(120, 110, 130, 90, 100, 110)
)
The result should look like this (year and month on the x axis):