Each row is a point. The line builds from left to right.
| Jan | 84 |
|---|---|
| Feb | 71 |
| Mar | 76 |
| Apr | 58 |
| May | 61 |
| Jun | 47 |
| Jul | 39 |
| Aug | 52 |
<figure class="tablechart" data-chart="line">
<figcaption>
<b>Rainfall at the orchard</b><br><span>millimetres</span>
</figcaption>
<table>
<tbody>
<tr><th>Jan</th><td>84</td></tr>
<tr><th>Feb</th><td>71</td></tr>
<tr><th>Mar</th><td>76</td></tr>
<tr><th>Apr</th><td>58</td></tr>
<tr><th>May</th><td>61</td></tr>
<tr><th>Jun</th><td>47</td></tr>
<tr><th>Jul</th><td>39</td></tr>
<tr><th>Aug</th><td>52</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.
| Jan | 84 |
|---|---|
| Feb | 71 |
| Mar | 76 |
| Apr | 58 |
| May | 61 |
| Jun | 47 |
| Jul | 39 |
| Aug | 52 |
<figure class="tablechart" data-chart="line" data-chart-axis data-chart-grid>
<figcaption>
<b>Rainfall at the orchard</b><br><span>millimetres</span>
</figcaption>
<table>
<tbody>
<tr><th>Jan</th><td>84</td></tr>
<tr><th>Feb</th><td>71</td></tr>
<tr><th>Mar</th><td>76</td></tr>
…
</tbody>
</table>
</figure>
Add data-chart-shape="smooth" to the figure. The line is a curve through every point, and never goes higher or lower than the points on either side of it.
| Jan | 84 |
|---|---|
| Feb | 71 |
| Mar | 76 |
| Apr | 58 |
| May | 61 |
| Jun | 47 |
| Jul | 39 |
| Aug | 52 |
<figure class="tablechart" data-chart="line" data-chart-shape="smooth">
<figcaption>
<b>Rainfall at the orchard</b><br><span>millimetres</span>
</figcaption>
<table>
<tbody>
<tr><th>Jan</th><td>84</td></tr>
<tr><th>Feb</th><td>71</td></tr>
<tr><th>Mar</th><td>76</td></tr>
<tr><th>Apr</th><td>58</td></tr>
<tr><th>May</th><td>61</td></tr>
<tr><th>Jun</th><td>47</td></tr>
<tr><th>Jul</th><td>39</td></tr>
<tr><th>Aug</th><td>52</td></tr>
</tbody>
</table>
</figure>
Add data-chart-animate="grow" to the figure. The line 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.
| Jan | 84 |
|---|---|
| Feb | 71 |
| Mar | 76 |
| Apr | 58 |
| May | 61 |
| Jun | 47 |
| Jul | 39 |
| Aug | 52 |
<figure class="tablechart" data-chart="line" data-chart-shape="smooth" data-chart-animate="grow">
<figcaption>
<b>Rainfall at the orchard</b><br><span>millimetres</span>
</figcaption>
<table>
<tbody>
<tr><th>Jan</th><td>84</td></tr>
<tr><th>Feb</th><td>71</td></tr>
<tr><th>Mar</th><td>76</td></tr>
<tr><th>Apr</th><td>58</td></tr>
<tr><th>May</th><td>61</td></tr>
<tr><th>Jun</th><td>47</td></tr>
<tr><th>Jul</th><td>39</td></tr>
<tr><th>Aug</th><td>52</td></tr>
</tbody>
</table>
</figure>
Annotations work the same as in the other chart types.
| 2021 | 74 |
|---|---|
| 2022 | 80 |
| 2023 | 91 |
| 2024 | 102 |
| 2025 | 116 |
Each value column is a line. The column header is shown as the name at the end of the line.
| Year | North | South |
|---|---|---|
| 2016 | 41 | 30 |
| 2019 | 58 | 39 |
| 2022 | 77 | 52 |
| 2025 | 105 | 61 |
<figure class="tablechart" data-chart="line" data-chart-prefix="lineseries">
<figcaption>
<b>Apples per tree</b><br><span>each</span>
</figcaption>
<table>
<thead>
<tr><th>Year</th><th>North</th><th>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>
<tr><th>2022</th><td>77</td><td>52</td></tr>
<tr><th>2025</th><td>105</td><td>61</td></tr>
</tbody>
</table>
</figure>
Add data-chart-legend to the figure to show the names in a legend under the chart, instead of at the end of the lines.
| Year | North | South |
|---|---|---|
| 2016 | 41 | 30 |
| 2019 | 58 | 39 |
| 2022 | 77 | 52 |
| 2025 | 105 | 61 |
<figure class="tablechart" data-chart="line" data-chart-prefix="linelegend" data-chart-legend>
<figcaption>
<b>Apples per tree</b><br><span>each</span>
</figcaption>
<table>
<thead>
<tr><th>Year</th><th>North</th><th>South</th></tr>
</thead>
<tbody>
<tr><th>2016</th><td>41</td><td>30</td></tr>
…
<tr><th>2025</th><td>105</td><td>61</td></tr>
</tbody>
</table>
</figure>
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="line" 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 line.
| North | South | |
|---|---|---|
| 2016 | 41 | 30 |
| 2019 | 58 | 39 |
| 2022 | 77 | 52 |
| 2025 | 105 | 61 |
<figure class="tablechart" data-chart="line" data-fragment>
<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>41</td><td>30</td></tr>
<tr><th>2019</th><td>58</td><td>39</td></tr>
…
</tbody>
</table>
</figure>
Add data-fragment to a column header to show that whole line on a step.
| North | South | |
|---|---|---|
| 2016 | 41 | 30 |
| 2019 | 58 | 39 |
| 2022 | 77 | 52 |
| 2025 | 105 | 61 |
<figure class="tablechart" data-chart="line">
<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 line 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="line">
<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>