I have the following dataset:
xdata <- seq(as.Date("2020-11-01"),as.Date("2020-11-10"), "days")
ydata <- c(1:10)
datamipo <- data.frame(xdata,ydata)
And I want to make a chart using highcharter library. I want to highlight the days 2020-11-01 to 2020-11-05 with a plot band. This is what I tried:
datamipo %>%
hchart(type = "line",
hcaes(x = xdata, y = ydata),
color = "#25af7b") %>%
hc_xAxis(plotBands = list(
list(
from = 1,
to = 5,
label = list(text = "This is a plotBand"),
color = hex_to_rgba("red", 0.1),
zIndex = 1
)
))
But the plotband is not visible. Please, do you know how I can accomplish this?