Kibana 4 Custome plugins global filters

I have created a custom funnel plugin with the help of d3 libraries. Like the "Vertical Bar Chart" per-built in plugin I would like to create global filters on click action of a specific row of the funnel plugin I have created. I am not able to find how the filters are being applied for the Vertical Bar Chart plugin.


As you can see if I click on any of the split up rows from the Vertical Bar it creates a global filter and applies it to the data.

I would like to know how I can create that as well with my custom plugin.

It's been a little while, but IIRC, you need to attach a click event listener to your visualization using the filterBarClickHandler. You can see this in the code for Dashboard panels and Visualizations. In both cases, the events are attached to the visualizations as part of the app.

Visualizations in Kibana don't know much about Kibana, or Angular, so that's how we've abstracted that part. If whatever you are building doesn't follow that model, you should still be able to consume the filter bar modules directly if you need to.