These are called “step charts” or “step plots”. The “dygraphs” library in R by default displays time series data in a line. We can, however, plot the data in a step chart manner by using below function. library(dygraphs)
lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") %>%
dyOptions(stepPlot = TRUE) We have taken the same “lungDeaths” dataset to display this functionality here.