How to add percentage into the stacked bar plot in ggplot2?

My Code:

ggplot(data = telcom_data)+ geom_bar(mapping=aes(x=State, fill=Resolve_status))+ xlab("State") + ylab("Count of complaints")+ labs(title="Bar Chart for no of compaint State Wise")+ theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

The plot I currently I get

I need to add a percentage to each state as it's label(Percentage between open vs closed). How could I do it?

My Dataset looks like

Sample Dataset

Thanks in Advance!!



from Recent Questions - Stack Overflow https://ift.tt/37U2JFE
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation