# Canvas bar chart not sorting

**URL:** <https://discuss.elastic.co/t/canvas-bar-chart-not-sorting/251708>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [October 12, 2020, 4:12am UTC](https://discuss.elastic.co/t/canvas-bar-chart-not-sorting/251708 "2020-10-12T04:12:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 12, 2020, 4:12am UTC](https://discuss.elastic.co/t/canvas-bar-chart-not-sorting/251708/1 "2020-10-12T04:12:25Z")

</div>

Hello,  
I am running an ESQL to visualise a bar chart.  
Sort by is not working for me.  
The same query on a table works as expected.  
Am I missing anything? Bug? Feature?  
Version 7.9.2

```auto
filters "timefilterControl"
| essql 
  query="SELECT COUNT(field.keyword) AS count, field.keyword
FROM \"my-index*\"
GROUP BY field.keyword
order BY count DESC
LIMIT 10"
| pointseries x="count" y="field.keyword"
| sort by="x" reverse=false
| plot defaultStyle={seriesStyle bars=0.75 horizontalBars=true color="red"} legend=false xaxis=true 
  font={font family="'Open Sans', Helvetica, Arial, sans-serif" size=12 align="left" color="#FFFFFF" weight="normal" underline=false italic=false}
| render

```

 ![2020-10-12 14_41_56-Window](https://us1.discourse-cdn.com/elastic/original/3X/3/7/37789d2374e51c4f7effcad7b8f45c86ca358e5a.png)  
Thanks!

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [October 12, 2020, 7:01pm UTC](https://discuss.elastic.co/t/canvas-bar-chart-not-sorting/251708/2 "2020-10-12T19:01:33Z")

</div>

Hi @AClerk. Looks like there is an [existing bug report](https://github.com/elastic/kibana/issues/62770) for this. I suggest you copy and paste your question there to help the Canvas team prioritize this bug.

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 12, 2020, 10:11pm UTC](https://discuss.elastic.co/t/canvas-bar-chart-not-sorting/251708/3 "2020-10-12T22:11:24Z")

</div>

Thank you for confirming.

---

<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 9, 2020, 10:11pm UTC](https://discuss.elastic.co/t/canvas-bar-chart-not-sorting/251708/4 "2020-11-09T22:11:32Z")

</div>

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