Step by step
A chart that shows its rows one step at a time.
Steps
Add data-fragment to the figure. The chart then starts empty, and each step shows one more row. Tablechart puts a Previous and a Next button under the chart.
| Spring | 58 |
|---|---|
| Summer | 72 |
| Autumn | 70 |
| Winter | 41 |
<figure data-chart="column" data-fragment="">
<table>
<tbody>
<tr><th>Spring</th><td>58</td></tr>
<tr><th>Summer</th><td>72</td></tr>
<tr><th>Autumn</th><td>70</td></tr>
<tr><th>Winter</th><td>41</td></tr>
</tbody>
</table>
</figure>
The table stays complete, so screen readers read every row, whatever step the chart is at. Without animation, or on paper, a chart shows all its steps at once.
Rows that are there from the start
Add data-fragment to some rows instead of the figure. Rows without it are there from the start, and the others arrive one step each.
| Picked | 74.5 |
|---|---|
| Windfalls | 28.2 |
| Bruised | -16.1 |
| Peelings | -13.3 |
| Pressed | 73.3 |
<figure data-chart="waterfall">
<table>
<tbody>
<tr data-kind="total"><th>Picked</th><td>74.5</td></tr>
<tr data-fragment=""><th>Windfalls</th><td>28.2</td></tr>
<tr data-fragment=""><th>Bruised</th><td>-16.1</td></tr>
<tr data-fragment=""><th>Peelings</th><td>-13.3</td></tr>
<tr data-kind="total"><th>Pressed</th><td>73.3</td></tr>
</tbody>
</table>
</figure>
Several rows on one step
Rows with the same data-fragment-index arrive on the same step.
| North | 58 |
|---|---|
| South | 72 |
| East | 70 |
| West | 41 |
<figure data-chart="column">
<table>
<tbody>
<tr data-fragment data-fragment-index="1"><th>North</th><td>58</td></tr>
<tr data-fragment data-fragment-index="1"><th>South</th><td>72</td></tr>
<tr data-fragment data-fragment-index="2"><th>East</th><td>70</td></tr>
<tr data-fragment data-fragment-index="2"><th>West</th><td>41</td></tr>
</tbody>
</table>
</figure>
A column on its own step
On a chart with several value columns, add data-fragment to a column header. That column arrives whole, on a step of its own. An annotation can have data-fragment too; otherwise it arrives with the rows it is about.
| North | South | |
|---|---|---|
| 2022 | 58 | 41 |
| 2023 | 72 | 50 |
| 2024 | 70 | 63 |
| 2025 | 81 | 70 |
<figure data-chart="line">
<table>
<thead>
<tr><th></th><th>North</th><th data-fragment>South</th></tr>
</thead>
<tbody>
<tr><th>2022</th><td>58</td><td>41</td></tr>
<tr><th>2023</th><td>72</td><td>50</td></tr>
<tr><th>2024</th><td>70</td><td>63</td></tr>
<tr><th>2025</th><td>81</td><td>70</td></tr>
</tbody>
</table>
</figure>
Point by point
Add data-fragment to cells. Each cell arrives on a step of its own, and cells without it are there from the start. The steps go down each column of the table: one line point by point, then the next.
| North | South | |
|---|---|---|
| 2022 | 58 | 41 |
| 2023 | 72 | 50 |
| 2024 | 70 | 63 |
| 2025 | 81 | 70 |
<figure data-chart="line">
<table>
<thead>
<tr><th></th><th>North</th><th>South</th></tr>
</thead>
<tbody>
<tr><th>2022</th><td data-fragment>58</td><td data-fragment>41</td></tr>
<tr><th>2023</th><td data-fragment>72</td><td data-fragment>50</td></tr>
<tr><th>2024</th><td data-fragment>70</td><td data-fragment>63</td></tr>
<tr><th>2025</th><td data-fragment>81</td><td data-fragment>70</td></tr>
</tbody>
</table>
</figure>
This works on any chart with several value columns. Grouped columns and bars arrive one at a time, and a stack is built piece by piece: first the bottom layer, then the next layer on top. The total above a stack arrives with its last piece. For another order, give the cells a data-fragment-index.
| Farm shop | Market | |
|---|---|---|
| 2023 | 64 | 38 |
| 2024 | 71 | 45 |
| 2025 | 69 | 57 |
<figure data-chart="column" data-chart-stack>
<table>
<thead>
<tr><th></th><th>Farm shop</th><th>Market</th></tr>
</thead>
<tbody>
<tr><th>2023</th><td data-fragment>64</td><td data-fragment>38</td></tr>
<tr><th>2024</th><td data-fragment>71</td><td data-fragment>45</td></tr>
<tr><th>2025</th><td data-fragment>69</td><td data-fragment>57</td></tr>
</tbody>
</table>
</figure>