How to create a customized plugin for aggFilter

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"}…

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/

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.

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

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?

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