Easiest way to explain is via this image:
I would like to make a stacked ggplot which shows (in values, not percent) the cumulative sum of a value over time while simultaneously, the total "potential" for that value in the background.
I imagine the dataset would need to look something like:
+------------+-------+------------------+-----------------+
| Date | Value | Cumulative Value | Potential Value |
+------------+-------+------------------+-----------------+
| 2017-01-01 | 100 | 100 | 500 |
| 2018-01-01 | 100 | 200 | 500 |
| 2019-01-01 | 100 | 300 | 500 |
+------------+-------+------------------+-----------------+
#example set:
df <- data.frame(
"Date" = as.Date( c("2017-01-01","2018-01-01","2019-01-01") ),
"Value" = c(100,100,100),
"Cumulative Value" = c(100,200,300),
"Potential Value" = c(500,500,500)
)
My primary attempt was something along the lines of:
ggplot(df, aes(y=`Cumulative.Value`, x=Date)) +
geom_bar( stat="identity")
And then I started reading into the position_stack option - Just a little confused on direction here.


