Hmm, I'm really not sure if it makes sense to answer my question ...
But due to the fact that I did not get any answer, my initial question was a bit silly.
However, on the last day I spent some time resolving my problem. Basically my solution is to add additional segments according to the duration of the event. I leave you my time calculations. This is because my initial interest was how to provide a gradient for a polygon.
Some of you may find my solution useful.
Cheers Tom
library(ggplot2) library(reshape) event.day <- c("A", "A", "A", "A", "B", "B") event <- c(1, 2, 3, 4, 5, 6) sys <- c(120, 160, 100, 180, 100, 180) duration <- c(50, 100, 50, 150, 350, 0) df <- data.frame(event.day, event, sys, duration) df$end <- c(df$sys[-1], NA)
Using this code, I managed to create a diagram that looks like this:

Tom martens
source share