# Stacked area
URL: /diagrammatic/docs/charts/stacked-area

How a total splits over time.

> 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 { StackedArea } from "diagrammatic";
```

A grid operator's dashboard shows the day's generation stacked by source, because demand must always equal the top edge. This is a sunny weekday in spring.

- labels

  - 00
  - 01
  - 02
  - 03
  - 04
  - 05
  - 06
  - 07
  - 08
  - 09
  - 10
  - 11
  - 12
  - 13
  - 14
  - 15
  - 16
  - 17
  - 18
  - 19
  - 20
  - 21
  - 22
  - 23
  - 24

- series

  - gas

    - 15
    - 14
    - 13
    - 13
    - 12
    - 11
    - 9
    - 7
    - 6
    - 5
    - 4
    - 4
    - 5
    - 5
    - 6
    - 8
    - 10
    - 15
    - 19
    - 22
    - 22
    - 21
    - 19
    - 17
    - 16

  - nuclear

    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8
    - 8

  - wind

    - 9
    - 10
    - 10
    - 9
    - 9
    - 8
    - 8
    - 7
    - 7
    - 7
    - 8
    - 8
    - 8
    - 7
    - 7
    - 8
    - 8
    - 8
    - 9
    - 9
    - 10
    - 10
    - 10
    - 9
    - 9

  - solar

    - 0
    - 0
    - 0
    - 0
    - 0
    - 0
    - 1
    - 3
    - 6
    - 10
    - 13
    - 15
    - 16
    - 15
    - 13
    - 10
    - 7
    - 4
    - 1
    - 0
    - 0
    - 0
    - 0
    - 0
    - 0

- unit

  GW

* aspect

  2.2

* title

  Generation mix

* yTicks

  - - at

      0

    - label

      0

  - - at

      20

    - label

      20

  - - at

      40

    - label

      40

* guides

  - - at

      40

    - label

      evening peak

* labels

  - 00
  -
  -
  -
  -
  -
  - 06
  -
  -
  -
  -
  -
  - 12
  -
  -
  -
  -
  -
  - 18
  -
  -
  -
  -
  -
  - 24

* series

  - - name

      gas

    - data

      - 15
      - 14
      - 13
      - 13
      - 12
      - 11
      - 9
      - 7
      - 6
      - 5
      - 4
      - 4
      - 5
      - 5
      - 6
      - 8
      - 10
      - 15
      - 19
      - 22
      - 22
      - 21
      - 19
      - 17
      - 16

  - - name

      nuclear

    - data

      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8
      - 8

  - - name

      wind

    - data

      - 9
      - 10
      - 10
      - 9
      - 9
      - 8
      - 8
      - 7
      - 7
      - 7
      - 8
      - 8
      - 8
      - 7
      - 7
      - 8
      - 8
      - 8
      - 9
      - 9
      - 10
      - 10
      - 10
      - 9
      - 9

  - - name

      solar

    - data

      - 0
      - 0
      - 0
      - 0
      - 0
      - 0
      - 1
      - 3
      - 6
      - 10
      - 13
      - 15
      - 16
      - 15
      - 13
      - 10
      - 7
      - 4
      - 1
      - 0
      - 0
      - 0
      - 0
      - 0
      - 0

Illustrative data. Spring weekday, one control area. Gigawatts at the hour.

fig. 03 · Grid generation mix across one day

Solar swells through midday and gas fills the morning and evening shoulders around it. Demand peaks at 40 GW at 20:00, above the midday 37 GW: solar is already gone, so gas has to climb back. Nuclear is a flat floor; wind ignores the sun.

- Use it for

  A total and its parts moving together through time.

- Watch out

  Middle bands ride on wobbly baselines; only the bottom band and the total read precisely.