title: Subset a bupaR process map based on click on a bar of activity frequency bar graph
body: <p>I have the <code>shiny</code> app below in which an activity frequency bar is displayed on top and a process bar in the bottom. Is it possible to enable clicking on a bar in the upper bar graph and subset the process map based on that selection in order to display only the relative nodes connected ?</p>
  <p><a href="https://i.stack.imgur.com/8t1PK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8t1PK.png" alt="enter image description here" /></a></p>
  <h2>app.R</h2>
  <pre><code>library(shiny)
  library(shinydashboard)
  library(bupaR)
  library(processmapR)
  library(eventdataR)
  library(DiagrammeR)
  library(svgPanZoom)
  library(DiagrammeRsvg)
  library(plotly)
  ui &lt;- dashboardPage(
    dashboardHeader(title = &quot;decio&quot;),
    dashboardSidebar(
      collapsed = TRUE
      
    ),
    dashboardBody(
      
      plotlyOutput(&quot;activity_frequency&quot;),
      svgPanZoomOutput(&quot;pmap&quot;),
          
      )
      
  )
    
  
  
  server &lt;- function(input, output,session) {
    sip&lt;-bupaR::simple_eventlog(eventlog = eventdataR::sepsis,
                                case_id = &quot;case_id&quot;,
                                activity_id = &quot;activity&quot;,
                                #activity_instance_id = &quot;activity_instance_id&quot;,
                                timestamp = &quot;timestamp&quot;,
                                #lifecycle_id = &quot;lifecycle&quot;,
                                resource_id = &quot;resource&quot;
    )
    output$activity_frequency &lt;- renderPlotly({
      
      ggplotly(sip %&gt;% activity_frequency(&quot;trace&quot;) %&gt;% plot())
    })
    output$pmap &lt;- renderSvgPanZoom({
      
      process_map(sip, type_nodes = frequency(&quot;relative_case&quot;,color_scale = &quot;Purples&quot;),type_edges = performance(mean,&quot;days&quot;, color_edges = &quot;Purples&quot;),
                  rankdir = &quot;TB&quot;, render = FALSE) %&gt;% 
        generate_dot() %&gt;% 
        grViz(width = 800, height = 1600) %&gt;% 
        export_svg %&gt;% 
        svgPanZoom(height=800, controlIconsEnabled = TRUE)
      
    })
    
    
  }
  
  shinyApp(ui, server)
  </code></pre>