Grafana Heatmap buckets alphabetically ordered

Hi, I’ve deployed an application (Graphite) and I’m sending Pre-bucketed data to Grafana and trying to create a heat map with this data.

To do so, I followed the docs available at http://docs.grafana.org/features/panels/heatmap/

The data seem to be displayed as expected with one problem: The buckets are order alphabetically and numerically. The heat map should order the buckets in the Y-axis from smallest at the bottom to largest.

Is it possible to do this? Is there any configuration that I’m missing?

The images explaining my heat map:

Axes Configuration:

I’m using Grafana v5.2.2

Update: I’ve added a sort function to my query as in the image below
40

However, there is still some problems with the order. The order is almost correct, however, the middle (which is 0.00) and first (which is 40.00) elements are mixed and I cannot seem to be able to fix it.

Is this a bug?

The image: