Hey @Xavier_Romero,
Based on the discussion in Incorrect Order by Descending in Kibana visualization, I expect that the legend order is dependent on the order of the aggregation results from Elasticsearch, and is unfortunately not something you can control independently of the aggregation result.
We have an issue tracking this here, which goes back quite a ways: https://github.com/elastic/kibana/issues/3118