I am working with R and making come charts with ggplot. However, I am trying to add the legend to my barplot through the following code in vain.
library(ggplot2)
library(dplyr)
data<- data.frame(years = c(2009:2018),
                      values <- c(-9400, -8792, -10914, -17996, -25543, -27814, -33335, -38872, -38243, -37034))
my_barplot <- data %>%
  ggplot(aes(x=years, y=values))+
  xlab('name x axis') + ylab('name y axis') +
  geom_col(aes(fill="bla bla"))+
  scale_x_continuous(breaks = seq(2009, 2018, by = 2))+
  labs(title="title", 
       subtitle="Subtitle", 
       caption="Source")+
  geom_text(aes(label=paste0((values))),
            position=position_stack(vjust=0.5),size=3)+
  # scale_color_manual('', labels = 'label', values = 'red') +
  stat_smooth(color = "#FC4E07", fill = "#FC4E07",
    method = "loess",formula = y ~ x, size = 1, se= FALSE)+
  scale_colour_manual(name = 'Legend', 
                      guide = 'legend',
                      values = c('MA50' = 'blue',
                                 'MA200' = 'red'), 
                      labels = c('SMA(50)',
                                 'SMA(200)'))+
  theme_minimal()
Would you be able to help me please?
 
    
