# Heatmap with wrong axis

**URL:** <https://community.grafana.com/t/heatmap-with-wrong-axis/116092>\
**Category:** Dashboards\
**Tags:** heatmap\
**Created:** [March 4, 2024, 5:03pm UTC](https://community.grafana.com/t/heatmap-with-wrong-axis/116092 "2024-03-04T17:03:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonyogomez](https://avatars.discourse-cdn.com/v4/letter/t/919ad9/32.png) [@tonyogomez](https://community.grafana.com/u/tonyogomez)\
**Post date:** [March 4, 2024, 5:03pm UTC](https://community.grafana.com/t/heatmap-with-wrong-axis/116092/1 "2024-03-04T17:03:51Z")

</div>

Hello everyone, I’m new to both the Community and Grafana. I hope you can help me 🙂

I’m using Grafana v9.5.3 (916d9793aa) in Windows 10 Home

I’m trying to make a heatmap

The origin of the data is PostgreSQL

This is the query i’m using:

```auto
SELECT
  EXTRACT(HOUR FROM "FECHA") AS Hora,
  TO_CHAR("FECHA", 'Month') AS Mes,
  SUM("CANTIDAD") AS Cantidad
FROM
  rampas_dia
WHERE
  $__timeFilter("FECHA")
GROUP BY
  EXTRACT(HOUR FROM "FECHA"),
  TO_CHAR("FECHA", 'Month')
ORDER BY
  Hora ASC,
  Mes DESC

```

Also, I have a “Grouping to matrix” Transform in which  
Column is mes  
Row is hora  
Cell value is cantidad  
Empty value is True

This is the thing:

The Grafana shows the axis wrong.

This picture should shown the hours of the day Vs. the months of the year. But it shows only a few hours and overwrites values.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/e/9/e91a5029f7af06cc963da1f3cab53f8f733c718f.png)

We can see in the pictures below that 9, 10 and 11 are before 8. And also that the cells overlap

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/e/3/e37ca84d92033cce86290115c5e7a1f8721f547d.png)

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/8/9/8977e4fde22cdcade5b46464d0762b4b7134b8fc.png)

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/c/4/c4d81e51cb63a1749ad6ba67293bceb5672df6d8.png)

Even the months are not ordered even though it is in the query.

Please, I really need your help!!! I have all day changing things and nothing works ☹

Greetings,

Antonio
