Skip to content
Snippets Groups Projects
Commit 51db91e2 authored by LE DURAND Matteo's avatar LE DURAND Matteo
Browse files

ajout de l'onglet pour observé des projets selectionné

parent 6c8c4ef2
No related branches found
No related tags found
2 merge requests!24Resolve "ajouter un tab afin de trier les projet à afficher",!18MAJ de main de la branche dev
...@@ -101,9 +101,15 @@ ...@@ -101,9 +101,15 @@
# Retourner les liens avec un saut de ligne après chacun # Retourner les liens avec un saut de ligne après chacun
do.call(tagList, c(links, list(br()))) do.call(tagList, c(links, list(br())))
}) })
}) })
filteredData2 <- reactive({
req(input$idprojet)
filteredData() %>% dplyr::filter(project_name %in% input$idprojet )
})
output$filteredPlot <- plotly::renderPlotly({ output$filteredPlot <- plotly::renderPlotly({
p <- ggplot2::ggplot(filteredData(), ggplot2::aes(x = updated_at, y = as.factor(project_name))) + p <- ggplot2::ggplot(filteredData(), ggplot2::aes(x = updated_at, y = as.factor(project_name))) +
ggplot2::geom_jitter(ggplot2::aes(color = type, text = paste(updated_at, message, sep = "\n")), ggplot2::geom_jitter(ggplot2::aes(color = type, text = paste(updated_at, message, sep = "\n")),
...@@ -120,6 +126,25 @@ ...@@ -120,6 +126,25 @@
gouvdown::scale_color_gouv_discrete(palette = "pal_gouv_qual2") gouvdown::scale_color_gouv_discrete(palette = "pal_gouv_qual2")
plotly::ggplotly(p, tooltip = "text")
})
output$filteredPlot2 <- plotly::renderPlotly({
p <- ggplot2::ggplot(filteredData2(), ggplot2::aes(x = updated_at, y = as.factor(project_name))) +
ggplot2::geom_jitter(ggplot2::aes(color = type, text = paste(updated_at, message, sep = "\n")),
size = 3, alpha = 0.5,
height = 0, width = 0.75
) +
ggplot2::labs(shape = "Type", color = "Type", x = "") +
ggplot2::scale_x_datetime(date_labels = "%d/%m", timezone = "Europe/Paris") +
gouvdown::theme_gouv() +
ggplot2::theme(
axis.text.x = ggplot2::element_text(angle = 0, hjust = 1),
axis.title.y = ggplot2::element_blank()
) +
gouvdown::scale_color_gouv_discrete(palette = "pal_gouv_qual2")
plotly::ggplotly(p, tooltip = "text") plotly::ggplotly(p, tooltip = "text")
}) })
} }
...@@ -48,12 +48,24 @@ ui <- shinygouv::navbarPage_dsfr( # header & footer ------ ...@@ -48,12 +48,24 @@ ui <- shinygouv::navbarPage_dsfr( # header & footer ------
selectizeInput(inputId = "idprojet",label = "Projet : ", selectizeInput(inputId = "idprojet",label = "Projet : ",
choices = NULL, multiple = TRUE)), choices = NULL, multiple = TRUE)),
column_dsfr(2), column_dsfr(2),
shinygouv::column_dsfr(12,uiOutput("lien"),extra_class = "fr-my-6w") column_dsfr(3),
shinygouv::column_dsfr(9,uiOutput("lien"),extra_class = "fr-my-6w")
), ),
tabsetPanel_dsfr("tableau_proj",
tabPanel_dsfr(id = "graphe_total", title = "×“ÝÆ©ÞD╝É¥®Æ║₣♬∫☼∰",
shinygouv::fluidRow_dsfr( shinygouv::fluidRow_dsfr(
shinygouv::column_dsfr(12, plotly::plotlyOutput("filteredPlot", height = "700px"), shinygouv::column_dsfr(12, plotly::plotlyOutput("filteredPlot", height = "700px"),
extra_class = "fr-my-1w" extra_class = "fr-my-1w"
) )
) )
) ),
) tabPanel_dsfr(id = "graph_input", title = "graphique par choix",
shinygouv::fluidRow_dsfr(
shinygouv::column_dsfr(12, plotly::plotlyOutput("filteredPlot2", height = "700px"),
extra_class = "fr-my-1w"
)
)
)
)#↑ tableau_proj
)# ↑ Navbar
)# ↑ UI
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment