I'm trying to produce a stacked column chart with data labels.
I'm able to produce the chart, but was unable to find a way to input data labels. I have tried geom_text()
but it keeps asking me to input a y label (which if you see the ggplot code is not there). I have also tried adding geom_text(stat = "count")
but that also gives me an error saying
"Error: geom_text requires the following missing aesthetics: y and label".
PS - i'm aware I need to rename the y axis as percentage. I'm also trying to figure out how to have more contrasting colours
ggplot(property,
aes(x=Bedrooms.New, fill=Property.Type.)) +
geom_bar(position = "fill") +
scale_x_discrete(name = "Number of Bedrooms",
limits = sort(factor(unique(property$Bedrooms.New))))
I have added an image below to see what my output is right now!