I have a chart (it started out as a histogram but I changed it to a bar chart so that I could use percentages more easily):
This is the code for the chart:
ggplot(df, aes(as.Date(callclosed), y = (..count..)/sum(..count..))) +
geom_bar(fill = "skyblue1",
colour = "black") +
scale_y_continuous(labels = scales::percent, limits = c(0, 0.06)) +
scale_x_date(date_breaks = "1 day", date_labels = "%d-%b-%y") +
theme(axis.text.x = element_text(angle = 90))
How can I add labels to the top of each bar that shows the associated percentage?