# Heatmap
URL: /diagrammatic/docs/charts/heatmap

A matrix colored by value.

> For AI agents: a documentation index is available at [llms.txt](/llms.txt). Use `.md` for canonical markdown pages; `.mdx` is kept as a backwards-compatible alias on supported URL paths.

```
import { Heatmap } from "diagrammatic";
```

Seven days, twenty-four hours, a dot per cell. The punchcard is the job Heatmap already owns.

- matrix

  - rows

    - Mon
    - Tue
    - Wed
    - Thu
    - Fri
    - Sat
    - Sun

  - columns

    - 0h
    - 1h
    - 2h
    - 3h
    - 4h
    - 5h
    - 6h
    - 7h
    - 8h
    - 9h
    - 10h
    - 11h
    - 12h
    - 13h
    - 14h
    - 15h
    - 16h
    - 17h
    - 18h
    - 19h
    - 20h
    - 21h
    - 22h
    - 23h

  - values

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 11
      - 11
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 1
      - 1
      - 6
      - 10
      - 6
      - 6
      - 6
      - 1
      - 1
      - 1
      - 1
      - 0
      - 0
      - 3
      - 3
      - 0

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 1
      - 1
      - 2
      - 2
      - 2
      - 2
      - 2
      - 1
      - 1
      - 1
      - 1
      - 0
      - 0
      - 3
      - 3
      - 0

* aspect

  1.7

* mark

  dot

* title

  Commits by weekday and hour

* matrix

  - rows

    - Mon
    - Tue
    - Wed
    - Thu
    - Fri
    - Sat
    - Sun

  - cols

    - 0
    -
    -
    - 3
    -
    -
    - 6
    -
    -
    - 9
    -
    -
    - 12
    -
    -
    - 15
    -
    -
    - 18
    -
    -
    - 21
    -
    -

  - values

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 11
      - 11
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 5
      - 14
      - 18
      - 22
      - 16
      - 20
      - 24
      - 26
      - 31
      - 22
      - 14
      - 2
      - 2
      - 7
      - 7
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 1
      - 1
      - 6
      - 10
      - 6
      - 6
      - 6
      - 1
      - 1
      - 1
      - 1
      - 0
      - 0
      - 3
      - 3
      - 0

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 1
      - 1
      - 2
      - 2
      - 2
      - 2
      - 2
      - 1
      - 1
      - 1
      - 1
      - 0
      - 0
      - 3
      - 3
      - 0

Illustrative data. Commits by weekday and hour, last 12 weeks. n = 1,246.

fig. 38.1 · Commits by weekday and hour

The 15h to 16h block is busiest on weekdays, with 57 commits per day. Thursday has the largest late cluster, with 11 commits at both 21h and 22h against seven on other weekdays. Saturday morning exists; Sunday almost does not. Empty hours stay empty.

Twenty-six weeks, seven days. Empty cells stay empty. This is the calendar job, not the punchcard.

- matrix

  - rows

    - Mon
    - Tue
    - Wed
    - Thu
    - Fri
    - Sat
    - Sun

  - columns

    - w1
    - w2
    - w3
    - w4
    - w5
    - w6
    - w7
    - w8
    - w9
    - w10
    - w11
    - w12
    - w13
    - w14
    - w15
    - w16
    - w17
    - w18
    - w19
    - w20
    - w21
    - w22
    - w23
    - w24
    - w25
    - w26

  - values

    - - 0
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1

    - - 1
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5

    - - 0
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1

    - - 0
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1

    - - 0
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0

* aspect

  2.1

* mark

  calendar

* title

  Production deploys

* matrix

  - rows

    - Mon
    - Tue
    - Wed
    - Thu
    - Fri
    - Sat
    - Sun

  - cols

    - w1
    -
    -
    -
    - w5
    -
    -
    -
    - w9
    -
    -
    -
    - w13
    -
    -
    -
    - w17
    -
    -
    -
    - w21
    -
    -
    -
    - w25
    -

  - values

    - - 0
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1

    - - 1
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5
      - 6
      - 4
      - 5

    - - 0
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1
      - 1

    - - 0
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1
      - 3
      - 1

    - - 0
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2
      - 1
      - 1
      - 1
      - 1
      - 2

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0

    - - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 2
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0

Illustrative data. Production deploys across 26 weeks. n = 263.

fig. 38.2 · Production deploys, last half year

Tuesday has 126 deploys across the 26 weeks, more than any other day. Thursday follows with 49. Saturday and Sunday have activity only in weeks 11 and 19. The first week has only one Tuesday deploy.

- Use it for

  Category-by-category intensity: confusion matrices, correlations, schedules.

- Watch out

  One sequential ramp only; a rainbow scrambles the order.