# How to sort percentage bar by date?

**URL:** <https://discuss.elastic.co/t/how-to-sort-percentage-bar-by-date/285764>\
**Category:** Kibana\
**Created:** [October 3, 2021, 11:42am UTC](https://discuss.elastic.co/t/how-to-sort-percentage-bar-by-date/285764 "2021-10-03T11:42:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShayWeizman](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@ShayWeizman](https://discuss.elastic.co/u/ShayWeizman)\
**Post date:** [October 3, 2021, 11:42am UTC](https://discuss.elastic.co/t/how-to-sort-percentage-bar-by-date/285764/1 "2021-10-03T11:42:34Z")

</div>

Hi All,  
I'm using v 7.11.1  
I have this data structure in elastic:  
{  
"\_index" : "testcases",  
"\_type" : "\_doc",  
"\_id" : "ub0ll3sB2oqJ9931yhZw",  
"\_score" : 1.0,  
"\_source" : {  
"buildVersion" : "1.1.1.1",  
"testcase" : {  
"$" : {  
"name" : "Forward To Isolation",  
"time" : "14.984",  
"className" : "Contains a log with events 'Network Request' and 'Forward To Isolation"  
}  
},  
"testcaseName" : "Forward To Isolation",  
"testcaseStatus" : "Passed",  
"timestamp" : "2021-08-30T13:00:41.053Z"  
}  
}

The record is a test result (One of many tests), the tests running few times a day (every 4h) I've create visualize "Percentage Bar" that displayed the build number (In every build there are about 700 tests) , I want to see the builds sorted by **date** and to see the amount/percentage of fail/pass in each build (One on each other, separated by colors)

I have succeed to this chart, builds version in X axis and vertical is the test name braked by test status.... I just need to sort x-axis by **date** and not alphabetical...

 ![Screenshot_5](https://us1.discourse-cdn.com/elastic/original/3X/9/5/95eede82b0a8f5203ee3950a4614daa80f7374fd.png)

How it can be done?

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [October 4, 2021, 4:16pm UTC](https://discuss.elastic.co/t/how-to-sort-percentage-bar-by-date/285764/2 "2021-10-04T16:16:23Z")

</div>

Hi @ShayWeizman ,

at the moment it is not possible to sort categories in the visualization client side, as you are looking for. There's an issue you can track the feature request: [[Lens] Allow client-side sorting of dimensions at datasource level, for all chart types · Issue #86184 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/86184)

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [October 4, 2021, 4:39pm UTC](https://discuss.elastic.co/t/how-to-sort-percentage-bar-by-date/285764/3 "2021-10-04T16:39:28Z")

</div>

if you're able to switch from the bar you _can_ do this in the table visualization by clicking on the column

---

<div class="post-metadata">

**Author:** ![ShayWeizman](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@ShayWeizman](https://discuss.elastic.co/u/ShayWeizman)\
**Post date:** [October 4, 2021, 6:34pm UTC](https://discuss.elastic.co/t/how-to-sort-percentage-bar-by-date/285764/4 "2021-10-04T18:34:10Z")

</div>

Thanks for the answers Marcos and Graham!

---

<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 1, 2021, 6:34pm UTC](https://discuss.elastic.co/t/how-to-sort-percentage-bar-by-date/285764/5 "2021-11-01T18:34:21Z")

</div>

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