# Explicit Order of Terms in Bar Chart

**URL:** <https://discuss.elastic.co/t/explicit-order-of-terms-in-bar-chart/55207>\
**Category:** Kibana\
**Created:** [July 11, 2016, 3:30pm UTC](https://discuss.elastic.co/t/explicit-order-of-terms-in-bar-chart/55207 "2016-07-11T15:30:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![seth.yes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seth.yes/32/11788_2.png) [@seth.yes](https://discuss.elastic.co/u/seth.yes)\
**Post date:** [July 11, 2016, 3:30pm UTC](https://discuss.elastic.co/t/explicit-order-of-terms-in-bar-chart/55207/1 "2016-07-11T15:30:38Z")

</div>

I'm using ELK to monitor Cache Servers and have stacked bar graphs that represent a count based on cache hits, misses and expires. I want to order them so that they are stacked: hits, misses, expires. The problem is that this isn't alphabetically organized.

Is there a way in Kibana to explicitly order terms as needed above? I've messed around with the JSON input slightly but wasn't getting the results I expected.

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [July 11, 2016, 9:02pm UTC](https://discuss.elastic.co/t/explicit-order-of-terms-in-bar-chart/55207/2 "2016-07-11T21:02:40Z")

</div>

If I understand your question, this isn't possible at the moment. There's an open ticket for explicit ordering of stacked bars here: [Ability to order the series/slices/stacks on a chart · Issue #1269 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/1269)

> The problem is that this isn't alphabetically organized.

But perhaps I'm misreading your comment. Are you saying that alphabetical ordering would be good enough? If so, that should be possible: [Terms aggregation | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-order)

---

<div class="post-metadata">

**Author:** ![seth.yes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seth.yes/32/11788_2.png) [@seth.yes](https://discuss.elastic.co/u/seth.yes)\
**Post date:** [July 11, 2016, 10:21pm UTC](https://discuss.elastic.co/t/explicit-order-of-terms-in-bar-chart/55207/3 "2016-07-11T22:21:12Z")

</div>

Apologies if I was unclear -- it's straightforward how to alphabetically organize terms, I need to organize in the order of: Hit, Miss, Expired which is not alphabetical..

I see the ticket, thanks for your response.

---

<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:47pm UTC](https://discuss.elastic.co/t/explicit-order-of-terms-in-bar-chart/55207/4 "2017-07-06T13:47:10Z")

</div>


