I have a country level dataset with two types of data as shown here:
| Country | Type | Value | Total |
|---|---|---|---|
| Austria | Public | - 0.2 | 0.3 |
| Austria | Private | 0.5 | 0.3 |
| Belgium | Public | - 0.1 | 0.1 |
| Belgium | Private | 0.2 | 0.1 |
I was wondering how it would be possible to demarcate the Total column, which is the sum total of both types as a line upon the stacked barchart of both the values in the Type column.
The code for my stacked barchart is here:
ggplot(aes(x = Value, y = reorder(Country, Total), fill = Type)) + geom_bar(stat = "identity", color = "black") +
scale_fill_manual(values=c("#1E8BC3", "#E85B4E")) + geom_vline(xintercept = 0, size = 1)

