Shiny Graphic disappears when i switch from a tabPanel to another

I get this problem when i plot many dygraphs in shinydashbord tabPanel. I have an app with many tabPanel with a shiny graph on each of them. When the app is lunch every graph are correctly plot when i switch for a first time from a tabPanel to another. But when i come back to a graph on a tabPanel previously load : graph disappears. Before (tab1 and tab2):


After :

(coming back from tab3)

Hi, welcome!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one for a shiny app

Hi Thanks.
this is the link on shinyapps.io of my app : https://sno-observil.shinyapps.io/Matriochkas_ok/

The differents part of my shiny app are :

  • R file for csv and rds data import from dropbox : here

  • R file for graphs generation with dygraph : here

  • R file for UI and server : here

(Under my code for reprex)
Shiny Graphic disappears when i switch from a tabPanel to another
I get this problem when i plot many dygraphs in shinydashbord tabPanel. I have an app with many tabPanel with a shiny graph on each of them. When the app is lunch every graph are correctly plot when i switch for a first time from a tabPanel to another. But when i come back to a graph on a tabPanel previously load : graph disappears. Before (tab1 and tab2):
60707251-984ab400-9f0b-11e9-8072-84a64787633b.png

After :

60707223-8b2dc500-9f0b-11e9-9132-ade2fbb3c5bb.png

You can download the data here
borja_id_temp_2019
borja_id_temp_2018



library(shiny)
library(shinydashboard)
library(dygraphs)

borja_id_temp_2019 <-readRDS(file="Noue_Dumont_Amont_Debit_2019_ord.rds")
borja_id_temp_2018 <-readRDS(file="Noue_Dumont_Amont_Debit_2018_ord.rds")

dygrph_noue_amont_2019<- dygraph(borja_id_temp_2019, main = "Debit Amont 2019", group = "Debit Amont Noue")%>% dyAxis("y", label = "Debit(m3/s)") %>% dyAxis("y2", label = "Qualite")%>%  dySeries("Debit", axis = 'y')%>%dySeries("Code_Quali", axis = 'y2')%>% dyRangeSelector()
dygrph_noue_amont_2018<-dygraph(borja_id_temp_2018, main = "Debit Amont 2018", group = "Debit Amont Noue")%>% dyAxis("y", label = "Debit(m3/s)") %>% dyAxis("y2", label = "Qualite")%>%  dySeries("Debit", axis = 'y')%>%dySeries("Code_Quali", axis = 'y2')%>% dyRangeSelector()

ui <- dashboardPage(
  
 
  dashboardHeader(title = 'Reporting Dashboard'),
 
  dashboardSidebar(
    width = 350,
    sidebarMenu(
      menuItem("Site 1: Noue Dumont", tabName = "dumont", icon = icon("dashboard"))
      
    )),
  
  
  dashboardBody
  
  (
    tabItems(
      tabItem(
        
        tabName = "dumont",
        h2("Noue centralisée Standard de Nantes/Site Dumont"),
        
        box( width=NULL,
             title = "Debit Amont", status = "info", solidHeader = TRUE,
             collapsible = TRUE,collapsed = TRUE,
             
             tabBox(width=NULL,
                    
                    tabPanel("Noue_Debit_Amont2019",  
                                                      
                             dygraphOutput("dydebiamont2019",width = "100%")
                    ),
                    tabPanel("Noue_Debit_Amont2018",                         
                             dygraphOutput("dydebiamont2018",width = "100%")
                    )
             )
        )
      )
      
    )
  ))
  
  
  #fin du dashboardHeader
  
  
  server <- function(input, output)
  {
     
    output$dydebiamont2019 <- renderDygraph({
      dygrph_noue_amont_2019
    })
    output$dydebiamont2018 <- renderDygraph({
      dygrph_noue_amont_2018
    })
  }
  
  shinyApp(ui, server)