Grafana displays X-Axis in incorrect order

Hi guys.

Recently we found this problem:

As you can see, the order on the version code is not correct and, after hours of researching, we almost assure the following points:

  1. This behaviour is consequence of influxdb (our data source here) and the lack of “order by”.
  2. With alias by we cannot solve this, please correct me in this point if I’m wrong. Actually we use a $tag_version as alias by.
  3. The actual order make sense if we think in version as a string.

So, our help request here is, in short, is any workaround that we can use to achieve a correct version code order?