# How to create a customized plugin for aggFilter

**URL:** https://discuss.elastic.co/t/how-to-create-a-customized-plugin-for-aggfilter/90064
**Category:** Kibana
**Created:** [June 20, 2017, 9:06am UTC](https://discuss.elastic.co/t/how-to-create-a-customized-plugin-for-aggfilter/90064 "2017-06-20T09:06:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chie/32/19280_2.png) [@chie](https://discuss.elastic.co/u/chie)
#### Post date: [June 20, 2017, 9:06am UTC](https://discuss.elastic.co/t/how-to-create-a-customized-plugin-for-aggfilter/90064/1 "2017-06-20T09:06:34Z")

</div>

I want to know users motion.  
By using a line chart,  
For example, I want to display the time on the X axis and the value of the selectbook on the Y axis from the log of the book selection history for each user.

For example: logs  
{ "time": "2017-06-01 11:00:00", "selectbook": "sample01", "username": "john"},  
{ "time": "2017-06-01 11:30:00", "selectbook": "sample02", "username": "bob"},  
{ "time": "2017-06-01 11:50:00", "selectbook": "sample01", "username": "bob"},  
{ "time": "2017-06-01 12:00:00", "selectbook": "sample02", "username": "john"}  
{ "time": "2017-06-01 12:15:00", "selectbook": "sample03", "username": "john"}…

 ![](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c40567c84e6b4825093f1644705c1ac78b7f2a12.png)

However, with a custom plugin, it seems impossible to change aggFilter.

Please let me know how you can display the selectbook string on the Y axis.

Reference: https: [//www.timroes.de/2015/12/06/writing-kibana-4-plugins-visualizations-using-data/](https://www.timroes.de/2015/12/06/writing-kibana-4-plugins-visualizations-using-data/)

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [June 21, 2017, 10:36pm UTC](https://discuss.elastic.co/t/how-to-create-a-customized-plugin-for-aggfilter/90064/2 "2017-06-21T22:36:32Z")

</div>

I would first try to do this with the built-in visualization tools.

You could try indexing numbers for the `selectbook` sample values, then do this with a line-chart. One line for John and another for Bob. The Y-Axis could use the Top Hits aggregation to show the raw number values.

---

<div class="post-metadata">

### Author: ![chie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chie/32/19280_2.png) [@chie](https://discuss.elastic.co/u/chie)
#### Post date: [June 22, 2017, 2:14am UTC](https://discuss.elastic.co/t/how-to-create-a-customized-plugin-for-aggfilter/90064/3 "2017-06-22T02:14:39Z")

</div>

Oh! Thank you. The Top Hits use the original number data. I will try this way.

---

<div class="post-metadata">

### Author: ![chie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chie/32/19280_2.png) [@chie](https://discuss.elastic.co/u/chie)
#### Post date: [June 23, 2017, 2:32am UTC](https://discuss.elastic.co/t/how-to-create-a-customized-plugin-for-aggfilter/90064/4 "2017-06-23T02:32:42Z")

</div>

Hello, @tsullivan  
I thought about indexing the hash(hashCode()) value from the selectbook .  
However, the difference between the numerical values is large and the memory on the Y axis is not even.  
Is there any good idea?

---

<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 21, 2017, 2:32am UTC](https://discuss.elastic.co/t/how-to-create-a-customized-plugin-for-aggfilter/90064/5 "2017-07-21T02:32:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
