A problem when applying a filter to heat maps

I have a field of type date and default format insertion_time
I wanted to create a heat map visualization in Kibana 6.5 where I can have and the day_of_month on x-Axis, the hour of the day on y-Axis and the color represents the count.
So I had to create scripted fields that extract the hour and day_of_month as numbers and store them as sub fields under insertion_time.
The scripts I used are:
doc['insertion_time'].date.dayOfMonth forinsertion_time.day_of_month field and
doc['recording_time'].date.hourOfDay forinsertion_time.hour field
In the visualization settings, for X-axis Aggregation field I chose Terms the field is insertion_time.day_of_month, 31 values and the order is Alphabetical and Descending.
However, whenever I apply a filter or try to split the chart on some fields the order breaks.

My questions are:

  1. Is there any other way to handle the hour and day_of_month fields as date type? so Kibana can understand the way they should be ordered with?
  2. How can I prevent the visualization from re-ordering the terms on the X and Y axis?
  3. Are these issues solved in later versions of Kibana?
  4. Is there any better visualization that I can use to show the data distribution I am interested in? Even if this requires installing some other Kibana plugin.

Thanks in advance..

Use histogram instead of terms aggregation since the fields are numbers. This will give you the option to show all buckets.

14%20PM

Looks like the ordering is still a little wonky when a filter is applied. I filed https://github.com/elastic/kibana/issues/40790 to track.

If you use histogram aggregation and set "show empty buckets" and configure "Extended bounds", then the heatmap will work as expected.

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