Hello,
I've made an application shiny and I want to plot the graph with ggplo2.
My question is :
when I use the script below in my shiny application, I obtain the GRAPH A (see below) that's wrong!
when I use the same script directly in rstudio I obtained the GRAPH B, that is good!
WHY don't I the same graph? Have you an idea?
Thanks in advance to your help
my script in shiny
output$graph_perf<- renderPlot({
perf.project<-tdonne()
perf.project.tdy<-perf.project %>%
gather("types","perf",6:6)
print(perf.project.tdy)
p<-factor(perf.project.tdy$pas, levels = (unique(perf.project.tdy$pas)), ordered=TRUE)
ggplot(perf.project.tdy,aes(x=p , y=perf.project.tdy$perf,group = types)) +
geom_bar(stat="identity",position="stack",fill="steelblue") +
geom_text(aes(label=perf), vjust=1.6, color="white", size=3.5)+
theme(panel.background = element_blank(),
panel.grid.minor = element_blank(),
axis.ticks = element_blank(),
axis.line = element_line(colour=NA),
axis.line.x = element_line(colour="grey80"))
})
GRAPH A :

GRAPH B :
