# Split chart order by not working anymore?

**URL:** https://discuss.elastic.co/t/split-chart-order-by-not-working-anymore/295868
**Category:** Kibana
**Created:** [January 31, 2022, 6:14pm UTC](https://discuss.elastic.co/t/split-chart-order-by-not-working-anymore/295868 "2022-01-31T18:14:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ncasaux](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ncasaux/32/46950_2.png) [@ncasaux](https://discuss.elastic.co/u/ncasaux)
#### Post date: [January 31, 2022, 6:14pm UTC](https://discuss.elastic.co/t/split-chart-order-by-not-working-anymore/295868/1 "2022-01-31T18:14:31Z")

</div>

Hello,

I'm using the 7.16.3 versions of Kibana and Elasticsearch.

The "order by" of the "split chart" bucket in a bar chart does not seem to work properly anymore.

In my usecase, I'm using a "Custom metric" to do the ordering:

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

the `envName` - `envRank` association is like this:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e7f8ab27c659c6cfc51099db0fb00652dea6312c.png)

The result is this:

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

As you can see, I would except to have the env sorted like this (from left to right):  
`prod-b`, `prod-a`, `preprod`, `recette`

But it seems that it just uses the "normal" field `envName` to sort things alphabetically.

I'm 99% sure that it used to work with the 7.14.x versions of Kibana and Elasticsearch, so could it be a regression ?

Thanks! 🙂

Nicolas

---

<div class="post-metadata">

### Author: ![Stratoula\_Kalafateli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stratoula_kalafateli/32/70923_2.png) [@Stratoula\_Kalafateli](https://discuss.elastic.co/u/Stratoula_Kalafateli)
#### Post date: [February 2, 2022, 7:39am UTC](https://discuss.elastic.co/t/split-chart-order-by-not-working-anymore/295868/3 "2022-02-02T07:39:03Z")

</div>

@ncasaux thanx for reporting this. It seems to be a bug to me. I created an issue [[XY] Order by metric/custom metric doesn't work well for split chart · Issue #124318 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/124318) if you want to track it and we will try to fix it on a next minor 🙂

---

<div class="post-metadata">

### Author: ![ncasaux](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ncasaux/32/46950_2.png) [@ncasaux](https://discuss.elastic.co/u/ncasaux)
#### Post date: [February 2, 2022, 9:50am UTC](https://discuss.elastic.co/t/split-chart-order-by-not-working-anymore/295868/4 "2022-02-02T09:50:33Z")

</div>

Thank you @Stratoula_Kalafateli , I will track this issue indeed ! 😉

---

<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: [March 2, 2022, 9:50am UTC](https://discuss.elastic.co/t/split-chart-order-by-not-working-anymore/295868/5 "2022-03-02T09:50:37Z")

</div>

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