Canvas Bar charts : bars not always displaued in the same order

Hi,
I have a bar chart in a workpad canvas in which I also have a control menu to apply a filter on my workpad.
When I use this control , my values are correctly uptdated in the bar chart but the order of the bars sometimes changes whereas I would like them to be always the same (ascending alphabetical). Is there a way to force the order of the bars ?

Thanks for your help.

You sure can. If you open the expression editor, try adding | sort by="x" after pointseries and before plot. Could you let me know if that works?

Hi
It doesn't work. I have this error message : Expression failed with the message:
[plot] > Can not cast 'datatable' to any of 'pointseries'
Thanks for your help

Il also have this error :
image
here is my code

Trying to type the name of the field was not helpfull too.

I found a solution by changing my request to an esdocs rathen than esqlt and putting the sort after the query. It works fine :slightly_smiling_face: .
Annabelle

filters
| esdocs index="bds" query="* where country='Ivory Coast'" sort="plateforme.keyword, asc"
| pointseries y="community" x="plateforme" color="plateforme" text=""

Alternatively, you could have done something like

SELECT * FROM bds WHERE country = 'Ivory Coast' SORT BY plateforme.keyword ASC

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