From c7708cd4a66fbf69519b406e78015b702a88e34c Mon Sep 17 00:00:00 2001
From: thierrychambert <thierry.chambert@gmail.com>
Date: Mon, 6 Sep 2021 07:26:01 +0200
Subject: [PATCH] changed title display for "traj plot"

---
 inst/ShinyApp/server.R | 8 +++++++-
 inst/ShinyApp/ui.R     | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/inst/ShinyApp/server.R b/inst/ShinyApp/server.R
index 3c66bf6..2d0a902 100644
--- a/inst/ShinyApp/server.R
+++ b/inst/ShinyApp/server.R
@@ -1053,7 +1053,13 @@ server <- function(input, output, session){
     if(is.null(out$run)) {} else {plot_traj(N = out$run$N, xlab = "year", ylab = "pop size")}
   }
 
-  output$graph_traj <- renderPlot({
+  output$title_traj_plot <- renderText({
+    if(input$run > 0){
+      "Graphique : Trajectoire démographique"
+    }
+  })
+
+  output$traj_plot <- renderPlot({
     plot_out_traj()
   })
   #####
diff --git a/inst/ShinyApp/ui.R b/inst/ShinyApp/ui.R
index 33a2500..17ea4b3 100644
--- a/inst/ShinyApp/ui.R
+++ b/inst/ShinyApp/ui.R
@@ -477,8 +477,8 @@ rm(list = ls(all.names = TRUE))
                  plotOutput("impact_plot", width = "100%", height = "550px"),
                  hr(),
 
-                 tags$h4(textOutput("title_impact_plot"), align = "center"),
-                 plotOutput("graph_traj", width = "100%", height = "550px")
+                 tags$h4(textOutput("title_traj_plot"), align = "center"),
+                 plotOutput("traj_plot", width = "100%", height = "550px")
         ), # End tabPanel
 
 
-- 
GitLab