Using plotly graphs as filters in Shiny

Hi.

I am building shiny dashboard using renderPlotly commands and I want to using bars in the bar graph as filters for displaying some records upon clicking. Any help on how to go about it would be great.

Thanks

See https://cpsievert.github.io/plotly_book/linking-views-with-shiny.html