Area Chart
Show the volume and shape of a series over time.
- Shipped
Inspect a point or use the arrow keys
View chart data
| Category | Shipped |
|---|---|
| Mon | 32 |
| Tue | 39 |
| Wed | 33 |
| Thu | 46 |
| Fri | 56 |
| Sat | 38 |
| Sun | 40 |
HTML
<figure class="rl-plot" data-rl-chart="area">
<figcaption><strong>Daily dispatches</strong><span>Studio dispatch · sample week</span></figcaption>
<ul class="rl-plot-legend" aria-label="Series"><li><i class="rl-plot-tone-0" aria-hidden="true"></i>Shipped</li></ul>
<svg viewBox="0 0 495 188" role="group" aria-label="Daily dispatches"><desc>Use the arrow keys to explore values. Open the data table for all values.</desc><line class="rl-plot-grid" x1="42" x2="480" y1="155" y2="155"/><text class="rl-plot-axis" x="35" y="159" text-anchor="end">0</text><line class="rl-plot-grid" x1="42" x2="480" y1="85.5" y2="85.5"/><text class="rl-plot-axis" x="35" y="89.5" text-anchor="end">28</text><line class="rl-plot-grid" x1="42" x2="480" y1="16" y2="16"/><text class="rl-plot-axis" x="35" y="20" text-anchor="end">56</text><text class="rl-plot-axis" x="73.29" y="179" text-anchor="middle">Mon</text><text class="rl-plot-axis" x="135.86" y="179" text-anchor="middle">Tue</text><text class="rl-plot-axis" x="198.43" y="179" text-anchor="middle">Wed</text><text class="rl-plot-axis" x="261" y="179" text-anchor="middle">Thu</text><text class="rl-plot-axis" x="323.57" y="179" text-anchor="middle">Fri</text><text class="rl-plot-axis" x="386.14" y="179" text-anchor="middle">Sat</text><text class="rl-plot-axis" x="448.71" y="179" text-anchor="middle">Sun</text><path class="rl-plot-area rl-plot-tone-0" d="M73.29,75.57 L135.86,58.2 L198.43,73.09 L261,40.82 L323.57,16 L386.14,60.68 L448.71,55.71 L448.71,155 L73.29,155 Z"/><polyline class="rl-plot-line rl-plot-tone-0" points="73.29,75.57 135.86,58.2 198.43,73.09 261,40.82 323.57,16 386.14,60.68 448.71,55.71"/><g class="rl-plot-point rl-plot-tone-0" tabindex="0" role="img" aria-label="Mon · Shipped: 32" data-rl-series="0" data-rl-plot-value="Mon · Shipped: 32"><circle cx="73.29" cy="75.57" r="9" fill="transparent"/><circle class="rl-plot-dot" cx="73.29" cy="75.57" r="3.8"/></g><g class="rl-plot-point rl-plot-tone-0" tabindex="-1" role="img" aria-label="Tue · Shipped: 39" data-rl-series="0" data-rl-plot-value="Tue · Shipped: 39"><circle cx="135.86" cy="58.2" r="9" fill="transparent"/><circle class="rl-plot-dot" cx="135.86" cy="58.2" r="3.8"/></g><g class="rl-plot-point rl-plot-tone-0" tabindex="-1" role="img" aria-label="Wed · Shipped: 33" data-rl-series="0" data-rl-plot-value="Wed · Shipped: 33"><circle cx="198.43" cy="73.09" r="9" fill="transparent"/><circle class="rl-plot-dot" cx="198.43" cy="73.09" r="3.8"/></g><g class="rl-plot-point rl-plot-tone-0" tabindex="-1" role="img" aria-label="Thu · Shipped: 46" data-rl-series="0" data-rl-plot-value="Thu · Shipped: 46"><circle cx="261" cy="40.82" r="9" fill="transparent"/><circle class="rl-plot-dot" cx="261" cy="40.82" r="3.8"/></g><g class="rl-plot-point rl-plot-tone-0" tabindex="-1" role="img" aria-label="Fri · Shipped: 56" data-rl-series="0" data-rl-plot-value="Fri · Shipped: 56"><circle cx="323.57" cy="16" r="9" fill="transparent"/><circle class="rl-plot-dot" cx="323.57" cy="16" r="3.8"/></g><g class="rl-plot-point rl-plot-tone-0" tabindex="-1" role="img" aria-label="Sat · Shipped: 38" data-rl-series="0" data-rl-plot-value="Sat · Shipped: 38"><circle cx="386.14" cy="60.68" r="9" fill="transparent"/><circle class="rl-plot-dot" cx="386.14" cy="60.68" r="3.8"/></g><g class="rl-plot-point rl-plot-tone-0" tabindex="-1" role="img" aria-label="Sun · Shipped: 40" data-rl-series="0" data-rl-plot-value="Sun · Shipped: 40"><circle cx="448.71" cy="55.71" r="9" fill="transparent"/><circle class="rl-plot-dot" cx="448.71" cy="55.71" r="3.8"/></g></svg>
<span class="rl-plot-tooltip" data-rl-plot-tooltip aria-hidden="true" hidden></span>
<div class="rl-plot-readout" data-rl-plot-readout>Inspect a point or use the arrow keys</div>
<details class="rl-plot-data"><summary>View chart data</summary><div><table class="rl-table"><caption>Daily dispatches</caption><thead><tr><th scope="col">Category</th><th scope="col">Shipped</th></tr></thead>
<tbody><tr><th scope="row">Mon</th><td>32</td></tr><tr><th scope="row">Tue</th><td>39</td></tr><tr><th scope="row">Wed</th><td>33</td></tr><tr><th scope="row">Thu</th><td>46</td></tr><tr><th scope="row">Fri</th><td>56</td></tr><tr><th scope="row">Sat</th><td>38</td></tr><tr><th scope="row">Sun</th><td>40</td></tr></tbody></table></div></details>
</figure>The SVG and data table share one dataset. Tab into the chart once. Arrow left and right inspect categories. Arrow up and down change series. The next Tab reaches the data table. The optional insight-charts.mjs helper renders this HTML on your server.
Use in your app
Copy these tags into your page head once. Serve the files at the paths shown, then add the example’s template to your page.
Page assets
<link rel="stylesheet" href="/mero.css">
<link rel="stylesheet" href="/mero-insights.css">
<script defer src="/mero.js"></script>
<script defer src="/mero-insights.js"></script>Optional server helper · insight-charts.mjs ↓
Download library and examples ↓