# Kibana 4 Custome plugins global filters

**URL:** <https://discuss.elastic.co/t/kibana-4-custome-plugins-global-filters/54446>\
**Category:** Kibana\
**Created:** [June 30, 2016, 4:34pm UTC](https://discuss.elastic.co/t/kibana-4-custome-plugins-global-filters/54446 "2016-06-30T16:34:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![masslive717](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@masslive717](https://discuss.elastic.co/u/masslive717)\
**Post date:** [June 30, 2016, 4:34pm UTC](https://discuss.elastic.co/t/kibana-4-custome-plugins-global-filters/54446/1 "2016-06-30T16:34:40Z")

</div>

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.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/8/8dd038c7f52d5921991fd97383fd1bbd2dee4152.PNG)  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/393772177719d804ddffb6fa1d1380d828df156f.PNG)

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.

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [July 13, 2016, 6:57pm UTC](https://discuss.elastic.co/t/kibana-4-custome-plugins-global-filters/54446/2 "2016-07-13T18:57:35Z")

</div>

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](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/dashboard/components/panel/lib/visualization.js#L12) and [Visualizations](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/visualize/editor/editor.js#L145). 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](https://github.com/elastic/kibana/tree/master/src/ui/public/filter_bar) directly if you need to.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:46pm UTC](https://discuss.elastic.co/t/kibana-4-custome-plugins-global-filters/54446/3 "2017-07-06T13:46:53Z")

</div>


