I have the following piece of R code through which I want to see the Satisfaction Rate based on Type of Travel.
unipar = theme(legend.position = "none") +
theme(axis.text = element_text(size = 10),
axis.title = element_text(size = 11),
title = element_text(size = 13, face = "bold"))
col1 = "Set2"
ggplot(customer_raw, aes(x=TypeTravel, fill=Satisfaction)) +
geom_bar()+
unipar +
scale_fill_brewer(palette=col1) +
geom_text(aes(label = scales::percent(..prop..), group = 1),
stat= "count", size = 3.3, position = position_stack(0.06))+
geom_text(aes(label = ..count.., group = 1),
stat= "count", size = 3.3, position = position_stack(0.95)) +
labs(title = 'Satisfaction Rate (%) based on Type of Travel', y = '', x = '')
Currently, I am only able to show the count of each level within my variable and the % of each variable. This is how my graph looks:
Please help so that I am able to show the % of each level above each bar & the % split between Satisfied & Non-Satisfied within each bar.