A line chart with the space under the line filled. The fill fades in while the line builds.
| 2021 | 12 |
|---|---|
| 2022 | 18 |
| 2023 | 15 |
| 2024 | 24 |
| 2025 | 29 |
<figure class="tablechart" data-chart="area">
<figcaption>
<b>Visitors to the orchard</b><br><span>thousands</span>
</figcaption>
<table>
<tbody>
<tr><th>2021</th><td>12</td></tr>
<tr><th>2022</th><td>18</td></tr>
<tr><th>2023</th><td>15</td></tr>
<tr><th>2024</th><td>24</td></tr>
<tr><th>2025</th><td>29</td></tr>
</tbody>
</table>
</figure>
Add data-chart-axis for the numbers along the value axis, and data-chart-grid for a line at each of them. The scale then ends on a number of the axis.
| 2021 | 12 |
|---|---|
| 2022 | 18 |
| 2023 | 15 |
| 2024 | 24 |
| 2025 | 29 |
<figure class="tablechart" data-chart="area" data-chart-axis data-chart-grid>
<figcaption>
<b>Visitors to the orchard</b><br><span>thousands</span>
</figcaption>
<table>
<tbody>
<tr><th>2021</th><td>12</td></tr>
<tr><th>2022</th><td>18</td></tr>
<tr><th>2023</th><td>15</td></tr>
…
</tbody>
</table>
</figure>
Add data-chart-shape="smooth" to the figure. The top of each area is a curve through every point. In a stack, each area follows the curve of the one below it.
| 2021 | 12 |
|---|---|
| 2022 | 18 |
| 2023 | 15 |
| 2024 | 24 |
| 2025 | 29 |
<figure class="tablechart" data-chart="area" data-chart-shape="smooth">
<figcaption>
<b>Visitors to the orchard</b><br><span>thousands</span>
</figcaption>
<table>
<tbody>
<tr><th>2021</th><td>12</td></tr>
<tr><th>2022</th><td>18</td></tr>
<tr><th>2023</th><td>15</td></tr>
<tr><th>2024</th><td>24</td></tr>
<tr><th>2025</th><td>29</td></tr>
</tbody>
</table>
</figure>
Add data-chart-animate="grow" to the figure. The area grows up from zero instead of from left to right. A chart with data-fragment still builds from left to right, because each step adds a point.
| 2021 | 12 |
|---|---|
| 2022 | 18 |
| 2023 | 15 |
| 2024 | 24 |
| 2025 | 29 |
<figure class="tablechart" data-chart="area" data-chart-shape="smooth" data-chart-animate="grow">
<figcaption>
<b>Visitors to the orchard</b><br><span>thousands</span>
</figcaption>
<table>
<tbody>
<tr><th>2021</th><td>12</td></tr>
<tr><th>2022</th><td>18</td></tr>
<tr><th>2023</th><td>15</td></tr>
<tr><th>2024</th><td>24</td></tr>
<tr><th>2025</th><td>29</td></tr>
</tbody>
</table>
</figure>
Each value column is an area. The areas overlap, so each one is see-through.
| North | South | |
|---|---|---|
| 2016 | 41 | 30 |
| 2019 | 58 | 39 |
| 2022 | 77 | 52 |
| 2025 | 105 | 61 |
Add data-chart-stack to the figure. Each area starts on top of the one before it.
| Farm shop | Market | |
|---|---|---|
| 2023 | 64 | 38 |
| 2024 | 71 | 45 |
| 2025 | 69 | 57 |
Add data-chart-shape="step" to the figure. Each value is flat across its row, and a number is shown only where the value changes.
| Apple trees | Pear trees | |
|---|---|---|
| 2016 | 90% | 10% |
| 2017 | 90% | 10% |
| 2018 | 75% | 25% |
| 2019 | 75% | 25% |
| 2020 | 75% | 25% |
| 2021 | 60% | 40% |
| 2022 | 60% | 40% |
| 2023 | 55% | 45% |
| 2024 | 55% | 45% |
| 2025 | 55% | 45% |
Add data-fragment to the figure to show one point per step.
| 2021 | 12 |
|---|---|
| 2022 | 18 |
| 2023 | 15 |
| 2024 | 24 |
| 2025 | 29 |
<figure class="tablechart" data-chart="area" data-chart-shape="smooth" data-fragment>
<figcaption>
<b>Visitors to the orchard</b><br><span>thousands</span>
</figcaption>
<table>
<tbody>
<tr><th>2021</th><td>12</td></tr>
<tr><th>2022</th><td>18</td></tr>
<tr><th>2023</th><td>15</td></tr>
<tr><th>2024</th><td>24</td></tr>
<tr><th>2025</th><td>29</td></tr>
</tbody>
</table>
</figure>
With data-fragment on the figure, each step adds a point to every area.
| North | South | |
|---|---|---|
| 2020 | 42 | 18 |
| 2021 | 55 | 26 |
| 2022 | 38 | 31 |
| 2023 | 61 | 24 |
| 2024 | 49 | 35 |
| 2025 | 68 | 30 |
<figure class="tablechart" data-chart="area" data-chart-stack data-chart-shape="smooth" data-chart-legend data-fragment>
<figcaption>
<b>Apples picked</b><br><span>thousands</span>
</figcaption>
<table>
<thead>
<tr><th></th><th>North</th><th>South</th></tr>
</thead>
<tbody>
<tr><th>2020</th><td>42</td><td>18</td></tr>
<tr><th>2021</th><td>55</td><td>26</td></tr>
…
</tbody>
</table>
</figure>
Add data-fragment to a column header to show that whole area on a step.
| North | South | |
|---|---|---|
| 2016 | 41 | 30 |
| 2019 | 58 | 39 |
| 2022 | 77 | 52 |
| 2025 | 105 | 61 |
<figure class="tablechart" data-chart="area">
<figcaption>
<b>Apples per tree</b><br><span>each</span>
</figcaption>
<table>
<thead>
<tr>
<th></th>
<th data-fragment>North</th>
<th data-fragment>South</th>
</tr>
</thead>
<tbody>
<tr><th>2016</th><td>41</td><td>30</td></tr>
<tr><th>2019</th><td>58</td><td>39</td></tr>
…
</tbody>
</table>
</figure>
Add data-fragment to every cell. The steps go down each column: one area point by point, then the next.
| North | South | |
|---|---|---|
| 2016 | 41 | 30 |
| 2019 | 58 | 39 |
| 2022 | 77 | 52 |
| 2025 | 105 | 61 |
<figure class="tablechart" data-chart="area">
<figcaption>
<b>Apples per tree</b><br><span>each</span>
</figcaption>
<table>
<thead>
<tr><th></th><th>North</th><th>South</th></tr>
</thead>
<tbody>
<tr>
<th>2016</th>
<td data-fragment>41</td>
<td data-fragment>30</td>
</tr>
<tr>
<th>2019</th>
<td data-fragment>58</td>
<td data-fragment>39</td>
</tr>
…
</tbody>
</table>
</figure>
For more about area charts, see the Tablechart documentation.