title: In Shiny/R how to synchronize two sets of tab panels?
body: <p>I need to click on the tabpanel label &quot;Panel 2&quot; and on the right the plot on &quot;Panel Right Chart 2&quot; will shows up (The chart with green line).</p>
  <p>Bellow is my code:</p>
  <pre><code>library(shiny)
  
  ui &lt;- fluidPage(
    
    column(
      width = 6,
      
      tabsetPanel(
        
        tabPanel(
          strong(&quot;Panel 1&quot;)
        ),
        
        tabPanel(
          strong(&quot;Panel 2&quot;)
        ),
        
        tabPanel(
          strong(&quot;Panel 3&quot;)
        ))),
    
    column(
      width = 6,
      
      tabsetPanel(
        
        tabPanel(
          strong(&quot;Panel Right Chart 1&quot;),
          plotOutput(&quot;chart1&quot;)
        ),
        
        tabPanel(
          strong(&quot;Panel Right Chart 2&quot;),
          plotOutput(&quot;chart2&quot;)
        ),
        
        tabPanel(
          strong(&quot;Panel Right Chart 3&quot;),
          plotOutput(&quot;chart3&quot;)
        )))
    
    
      
      
  
  )
  
  server &lt;- function(input, output, session) {
    
    output$chart1 &lt;- renderPlot({
      ggplot(mtcars,aes(cyl,mpg)) + geom_line(color = 'red')
    })
    
    output$chart2 &lt;- renderPlot({
      ggplot(mtcars,aes(cyl,mpg)) + geom_line(color = 'green')
    })
    
    output$chart3 &lt;- renderPlot({
      ggplot(mtcars,aes(cyl,mpg)) + geom_line(color = 'blue')
    })
    
  }
  
  shinyApp(ui, server)
  </code></pre>