I'm trying to show in a linear chart in R from a Y (project) given the maximum date that corresponds to that Y, but it only shows me the highest date of that dataframe and not of each of the projects in order.
Example of Dataframe :
Chart:
Code:
output$grafica5 <-renderPlotly({
p <- ggplot(data(),aes(x=max(as.Date(data()[,names(data())[3]], format = "%d/%m/%Y")), y=as.factor(data()[,names(data())[2]]), group=1))+
geom_line()+
geom_point()+
theme_classic()+
theme(axis.text.x=element_text(angle=45, hjust=1))+scale_color_viridis(discrete = TRUE)+
labs(
y="Proyectos",
x="Fecha")})
Can you help me? Thanks in advance