# Sorting in Lens pies

**URL:** <https://discuss.elastic.co/t/sorting-in-lens-pies/327436>\
**Category:** Kibana\
**Created:** [March 10, 2023, 10:20am UTC](https://discuss.elastic.co/t/sorting-in-lens-pies/327436 "2023-03-10T10:20:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![InesCM](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@InesCM](https://discuss.elastic.co/u/InesCM)\
**Post date:** [March 10, 2023, 10:20am UTC](https://discuss.elastic.co/t/sorting-in-lens-pies/327436/1 "2023-03-10T10:20:18Z")

</div>

Hi there!

I thought that this was an issue with Legacy (aggregation based) visualizations, but I'm seeing this in Lens too... Am I missing something, or this makes no sense?

When I slice a donut chart by ranges, the colors and ordering get automatically assigned by volume of records, not by ranges. And I cannot find a way to change this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/9/79971475ab82f6bf25cfbb9e9ad71f083d138614.png)

Do you know if there's any way to change the sorting? This way I get an alarming dark orange for very low CPU utilization...

Thanks!

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [March 13, 2023, 12:30pm UTC](https://discuss.elastic.co/t/sorting-in-lens-pies/327436/2 "2023-03-13T12:30:55Z")

</div>

Hi,

There is no option for sorting in pie/donut chart.  
I recommend you to use percentage bar chart to sort by alphabetical order.  
Set "Rank by" option of "Break down by" to `Alphabetical`.

---

<div class="post-metadata">

**Author:** ![InesCM](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@InesCM](https://discuss.elastic.co/u/InesCM)\
**Post date:** [March 14, 2023, 9:48am UTC](https://discuss.elastic.co/t/sorting-in-lens-pies/327436/3 "2023-03-14T09:48:50Z")

</div>

Thanks so much for your support!

---

<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:** [April 11, 2023, 9:49am UTC](https://discuss.elastic.co/t/sorting-in-lens-pies/327436/4 "2023-04-11T09:49:43Z")

</div>

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