# Ordering for both axes of heatmap

**URL:** <https://discuss.elastic.co/t/ordering-for-both-axes-of-heatmap/104589>\
**Category:** Kibana\
**Created:** [October 19, 2017, 4:13pm UTC](https://discuss.elastic.co/t/ordering-for-both-axes-of-heatmap/104589 "2017-10-19T16:13:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgoldowsky](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bgoldowsky/32/22664_2.png) [@bgoldowsky](https://discuss.elastic.co/u/bgoldowsky)\
**Post date:** [October 19, 2017, 4:13pm UTC](https://discuss.elastic.co/t/ordering-for-both-axes-of-heatmap/104589/1 "2017-10-19T16:13:02Z")

</div>

I'm trying to make a heatmap view of data that's categorized on two different dimensions, each of which has a natural order. It looks something like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f8e5160ba067230b417c81d1527983baef98bbcf.png)

As you can see the Y "class" axis is not in the ascending order by term as I wanted.  
I can give the Y axis priority so that it does appear in the correct order like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/d/ad7efded026800007f635afaa58b262106e93208.png)

But now the investigation number is not in increasing order.

I think I understand what's going on -- it sorts the sub-aggregations within the scope of each primary item separately -- but is there any way to simply fix the order of both axes to be (globally) increasing by term?

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [October 24, 2017, 9:06am UTC](https://discuss.elastic.co/t/ordering-for-both-axes-of-heatmap/104589/2 "2017-10-24T09:06:40Z")

</div>

Hi Boris,

sorry for the late reply.

You explained exactly correct what Elasticsearch is doing here. Also within each of the high-level buckets different sub-buckets could exist, so it would be hard for ES to do a global ordering.

The only thing we could do, is building an option, that Kibana does the sorting on both axes for you. If you think that's an useful feature, please feel free to open an issue for this on [GitHub](https://github.com/elastic/kibana/issues).

Cheers,  
Tim

---

<div class="post-metadata">

**Author:** ![bgoldowsky](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bgoldowsky/32/22664_2.png) [@bgoldowsky](https://discuss.elastic.co/u/bgoldowsky)\
**Post date:** [October 24, 2017, 2:44pm UTC](https://discuss.elastic.co/t/ordering-for-both-axes-of-heatmap/104589/3 "2017-10-24T14:44:03Z")

</div>

Thank you for the response!  
I've filed an issue here: [https://github.com/elastic/kibana/issues/14536](https://github.com/elastic/kibana/issues/14536)

Boris

---

<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:** [November 21, 2017, 2:44pm UTC](https://discuss.elastic.co/t/ordering-for-both-axes-of-heatmap/104589/4 "2017-11-21T14:44:10Z")

</div>

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