Heatmap
The heatmap widget plots a single metric across two categorical axes, using color intensity to represent the value in each cell. It is the go-to chart for spotting activity patterns — when your users are most active, which combinations are hot or cold.
Use it for:
- Activity by hour of day × day of week
- Events by platform × country
- Any metric you want to compare across two dimensions at once
Query requirements
Section titled “Query requirements”Return exactly three columns: two axis columns and one numeric value column.
- The first non-value column is the X axis.
- The second non-value column is the Y axis.
- The numeric column (alias it
countorvalue) drives the cell color.
GROUP BY both axis columns.
Select
toHour(timestamp) AS hour,toDayOfWeek(timestamp) AS weekday,count() AS countFilters
WHERE name = 'app_started'GROUP BY hour, weekdaySELECT toHour(timestamp) AS hour, toDayOfWeek(timestamp) AS weekday, count() AS countFROM {table}WHERE name = 'app_started'GROUP BY hour, weekdayResult shape:
| hour | weekday | count |
|---|---|---|
| 18 | 5 | 320 |
| 19 | 5 | 410 |
| 20 | 6 | 380 |
Common examples
Section titled “Common examples”Activity by hour × weekday
Select: toHour(timestamp) AS hour, toDayOfWeek(timestamp) AS weekday, count() AS count
Filters: WHERE name = 'app_started' GROUP BY hour, weekday
Events by platform × country
Select: platform, country, count() AS count
Filters: GROUP BY platform, country