Charts and graphs

Choose a chart to explore comparisons, trends, shares or relationships.

Bar chart

Compare categories against a shared zero baseline.

Notebook activity by subject
View data table
Notebook activity by subject
SubjectSavedShared
Coast3212
City2415
Forest189
Highlands125
View markup
<figure class="ex-chart" data-ex-chart="bar">
  <figcaption>Notebook activity by subject</figcaption>
  <details open>
    <summary>View data table</summary>
    <table><caption>Notebook activity by subject</caption>
      <thead><tr><th scope="col">Subject</th><th scope="col" data-ex-summary="Coast had the most saves (32), followed by City (24).">Saved</th><th scope="col" data-ex-summary="City had the most shares (15), three more than Coast.">Shared</th></tr></thead>
      <tbody><tr><th scope="row">Coast</th><td>32</td><td>12</td></tr><tr><th scope="row">City</th><td>24</td><td>15</td></tr><tr><th scope="row">Forest</th><td>18</td><td>9</td></tr><tr><th scope="row">Highlands</th><td>12</td><td>5</td></tr></tbody>
    </table>
  </details>
</figure>
Use in a project

Line graph

Follow a measure over equally spaced intervals. A gap means no observation.

Notebook activity by week
View data table
Notebook activity by week
WeekSavedShared
Week 1125
Week 2187
Week 315No data
Week 4239
Week 52613
Week 63016
View markup
<figure class="ex-chart" data-ex-chart="line">
  <figcaption>Notebook activity by week</figcaption>
  <details open>
    <summary>View data table</summary>
    <table><caption>Notebook activity by week</caption>
      <thead><tr><th scope="col">Week</th><th scope="col" data-ex-summary="Weekly saves rose from 12 to 30, with a dip in week 3.">Saved</th><th scope="col" data-ex-summary="Weekly shares rose from 5 to 16. Week 3 has no reading.">Shared</th></tr></thead>
      <tbody><tr><th scope="row">Week 1</th><td>12</td><td>5</td></tr><tr><th scope="row">Week 2</th><td>18</td><td>7</td></tr><tr><th scope="row">Week 3</th><td>15</td><td data-ex-missing>No data</td></tr><tr><th scope="row">Week 4</th><td>23</td><td>9</td></tr><tr><th scope="row">Week 5</th><td>26</td><td>13</td></tr><tr><th scope="row">Week 6</th><td>30</td><td>16</td></tr></tbody>
    </table>
  </details>
</figure>
Use in a project

Multi-series line chart

Compare trends on the same scale. Select the series to show.

Guide visits by week
View data table
Guide visits by week
WeekTrail guidesCity guides
Week 11835
Week 22431
Week 328No data
Week 43133
Week 53830
Week 64227
View markup
<figure class="ex-chart" data-ex-chart="multi-line">
  <figcaption>Guide visits by week</figcaption>
  <details open>
    <summary>View data table</summary>
    <table><caption>Guide visits by week</caption>
      <thead><tr><th scope="col">Week</th><th scope="col" data-ex-summary="Trail visits rose from 18 to 42.">Trail guides</th><th scope="col" data-ex-summary="City visits fell from 35 to 27. Week 3 has no reading.">City guides</th></tr></thead>
      <tbody><tr><th scope="row">Week 1</th><td>18</td><td>35</td></tr><tr><th scope="row">Week 2</th><td>24</td><td>31</td></tr><tr><th scope="row">Week 3</th><td>28</td><td data-ex-missing>No data</td></tr><tr><th scope="row">Week 4</th><td>31</td><td>33</td></tr><tr><th scope="row">Week 5</th><td>38</td><td>30</td></tr><tr><th scope="row">Week 6</th><td>42</td><td>27</td></tr></tbody>
    </table>
  </details>
</figure>
Use in a project

Grouped bar chart

Compare several measures within each category, including gains and losses.

Change in saved notebooks
View data table
Change in saved notebooks
SubjectMayJune
Coast128
City-46
Forest3-2
View markup
<figure class="ex-chart" data-ex-chart="grouped-bar">
  <figcaption>Change in saved notebooks</figcaption>
  <details open>
    <summary>View data table</summary>
    <table><caption>Change in saved notebooks</caption>
      <thead><tr><th scope="col">Subject</th><th scope="col" data-ex-summary="In May, Coast gained 12 saves and City lost 4.">May</th><th scope="col" data-ex-summary="In June, Coast gained 8 saves and City gained 6.">June</th></tr></thead>
      <tbody><tr><th scope="row">Coast</th><td>12</td><td>8</td></tr><tr><th scope="row">City</th><td>-4</td><td>6</td></tr><tr><th scope="row">Forest</th><td>3</td><td>-2</td></tr></tbody>
    </table>
  </details>
</figure>
Use in a project

Pie chart

Show how a few categories divide a whole. Choose a slice to see its share.

Subjects in the notebook

Coast accounts for two fifths of the 60 entries.

View data table
Subjects in the notebook
SubjectEntries
Coast24
City18
Forest12
Highlands6
View markup
<figure class="ex-chart ex-data-chart" data-ex-data-chart="pie">
  <figcaption>Subjects in the notebook</figcaption>
  <p>Coast accounts for two fifths of the 60 entries.</p>
  <details open>
    <summary>View data table</summary>
    <table><caption>Subjects in the notebook</caption>
      <thead><tr><th scope="col">Subject</th><th scope="col">Entries</th></tr></thead>
      <tbody><tr><th scope="row">Coast</th><td>24</td></tr><tr><th scope="row">City</th><td>18</td></tr><tr><th scope="row">Forest</th><td>12</td></tr><tr><th scope="row">Highlands</th><td>6</td></tr></tbody>
    </table>
  </details>
</figure>
Use in a project

Radar chart

Compare several scores on the same scale. Select an axis to inspect its score.

Woodland route scores

Shade ranks highest and access lowest on the same five-point scale.

View data table
Woodland route scores
FeatureScore
Views4
Shade5
Access2
Wayfinding4
Quiet3
View markup
<figure class="ex-chart ex-data-chart" data-ex-data-chart="radar" data-ex-max="5">
  <figcaption>Woodland route scores</figcaption>
  <p>Shade ranks highest and access lowest on the same five-point scale.</p>
  <details open>
    <summary>View data table</summary>
    <table><caption>Woodland route scores</caption>
      <thead><tr><th scope="col">Feature</th><th scope="col">Score</th></tr></thead>
      <tbody><tr><th scope="row">Views</th><td>4</td></tr><tr><th scope="row">Shade</th><td>5</td></tr><tr><th scope="row">Access</th><td>2</td></tr><tr><th scope="row">Wayfinding</th><td>4</td></tr><tr><th scope="row">Quiet</th><td>3</td></tr></tbody>
    </table>
  </details>
</figure>
Use in a project

Scatter plot

Plot two numeric measures for each observation. Select a point to read both values.

Distance and bird species on five walks

The longest walk recorded fewer species than the woodland walk.

View data table
Distance and bird species on five walks
WalkDistance (km)Bird species
Canal25
Beach38
Woodland414
Moor69
Ridge811
View markup
<figure class="ex-chart ex-data-chart" data-ex-data-chart="scatter">
  <figcaption>Distance and bird species on five walks</figcaption>
  <p>The longest walk recorded fewer species than the woodland walk.</p>
  <details open>
    <summary>View data table</summary>
    <table><caption>Distance and bird species on five walks</caption>
      <thead><tr><th scope="col">Walk</th><th scope="col">Distance (km)</th><th scope="col">Bird species</th></tr></thead>
      <tbody><tr><th scope="row">Canal</th><td>2</td><td>5</td></tr><tr><th scope="row">Beach</th><td>3</td><td>8</td></tr><tr><th scope="row">Woodland</th><td>4</td><td>14</td></tr><tr><th scope="row">Moor</th><td>6</td><td>9</td></tr><tr><th scope="row">Ridge</th><td>8</td><td>11</td></tr></tbody>
    </table>
  </details>
</figure>
Use in a project

Use these charts in a project

Copy the example table and load the styles and module listed for that chart in the component index. Place the extracted supplement beside the starter’s vendor/ folder.

Replace the labels, units, values and summary together. Keep related series on a shared scale. Enter a missing observation as missing, so it stays distinct from zero.

Download visual guide

Setup instructions · Source for AI tools