suppose I have a data frame:
df<-data.frame(specie=c('apple','banana','orange'),total=c(1000,500,850),fresh=c(NA,250,700),processed=c(NA,250,150))
Note that for Apple, only Total value is available. I would like to create a bar plot that show both fresh and processed values for each specie, and show only total value for the case of Apple where fresh and processed values are NAs.
I tried with the codes below, but didn't get the plot I want:
p<-df %>% ggplot(aes(x=total,y=specie))
p+geom_col()+geom_col(aes(x=fresh,fill="fresh"))+geom_col(aes(x=processed,fill="processed"))
Why total area exceeds fresh and processed?

