It seems you can with last dev version of {highcharter}
. It is not very well documented, but xrange module is included in the package. You can do something like that (and surely with another way if you read the documentation of higcharter API).
library(lubridate)
# devtools::install_github("jbkunst/highcharter")
library(highcharter)
library(dplyr)
# dummy table
set.seed(1234)
size <- 10
df <- tibble(
start = today() + months(sample(10:20, size = size)),
end = start + months(sample(1:3, size = size, replace = TRUE)),
category = rep(1:3, length.out = size) - 1,
progress = round(runif(size), 1)
) %>%
# needs to convert to highchart timestamp format
mutate(
start = datetime_to_timestamp(start),
end = datetime_to_timestamp(end)
)
hchart(df, type = "xrange",
mapping = hcaes(x = start, x2 = end, y = category, partialFill = progress),
dataLabels = list(enabled = TRUE)) %>%
hc_xAxis(type = "datetime") %>%
hc_yAxis(categories = c("Protyping", "Dev", "Testing"))
the example is adapted from one in the GH repo when you look for xrange
About Highcharts and R, notice the warning when loading the package
library(highcharter)
#> Highcharts (www.highcharts.com) is a Highsoft software product which is
#> not free for commercial and Governmental use