Looking for some help with what I am assuming is a very simple task. From my data below, I want to create a stacked bar graph, with the fill = colnames(df_Consumers)[2,4]
. I'm trying to get the x-axis to be df_Consumers$Month
, the y-axis as df_Consumers$Referrals
with the 2nd and 4th columns being the stacked bar graphs. I hope this makes sense. Apologies in advance if I am too vague. My ggplot code and data are below. Thanks in advance!
ggplot(df_Consumers, aes(x = Month, y = Referrals)) +
geom_col(aes(fill = df_Consumers[2, 4]))
ggplot
likes long data frames. I'd suggest the following: