MarginNotesClub
Politics

Sample: How to add charts (with examples of every type)

A sample guide to the Chart block: line graphs, bar charts, pie and doughnut charts and histograms, with the exact data used for each one.

A bar chart and a pie chart in teal, coral and yellow on a pale yellow background

Illustration: MarginNotesClub

Key points

  • Insert a Chart block from the editor’s + menu and pick the chart type.
  • Type or paste the data one item per line, with a comma between the label and the number.
  • For two or more lines or bars, put the names on the first line.
  • For a histogram, just list the numbers; the site groups them for you.
In this article 7 sections
  1. How to insert a chart
  2. Bar chart: compare amounts
  3. Line graph: change over time
  4. Pie chart: parts of a whole
  5. Doughnut chart: parts of a whole, with the total
  6. Histogram: how a list of numbers is spread out
  7. Tips

This is a sample article. It shows each chart type with the exact data typed into the Chart block, so you can copy the pattern. All figures are invented. Delete this article whenever you like.

A chart should answer one question at a glance. If it needs a paragraph to explain, it’s the wrong chart.

How to insert a chart

In the article editor, tap + and choose Chart. Then fill in:

  • Chart type: bar, line, pie, doughnut or histogram.
  • Chart title: say what it shows, including the unit, e.g. “People waiting (millions)”.
  • Data: one item per line (see the examples below).
  • Unit: optional, e.g. %, £, m or weeks. £ and $ go before the number; everything else goes after.
  • Caption or source: optional, shown under the chart.

Every chart gets a Show the data link underneath, so readers (and screen readers) can see the exact figures.

Bar chart: compare amounts

What was typed in the Data box:

North, 42
Midlands, 38
London, 51
South West, 29
Example: patients waiting over a year, by region (thousands)
0k20k40k60kNorthMidlandsLondonSouth WestNorth: 42kMidlands: 38kLondon: 51kSouth West: 29k42k38k51k29k

Invented figures for illustration.

Show the data
Example: patients waiting over a year, by region (thousands)
North42k
Midlands38k
London51k
South West29k

Line graph: change over time

For two or more lines, put the names on the first line, starting with a heading for the labels:

Month, 2025, 2026
Jan, 7.1, 7.4
Feb, 7.2, 7.5
Mar, 7.2, 7.6
Apr, 7.3, 7.6
May, 7.3, 7.7
Jun, 7.4, 7.7
Example: people waiting for treatment (millions)
0m2m4m6m8mJanFebMarAprMayJunJan – 2025: 7.1mFeb – 2025: 7.2mMar – 2025: 7.2mApr – 2025: 7.3mMay – 2025: 7.3mJun – 2025: 7.4m7.4mJan – 2026: 7.4mFeb – 2026: 7.5mMar – 2026: 7.6mApr – 2026: 7.6mMay – 2026: 7.7mJun – 2026: 7.7m7.7m
  • 2025
  • 2026

Invented figures for illustration.

Show the data
20252026
Jan7.1m7.4m
Feb7.2m7.5m
Mar7.2m7.6m
Apr7.3m7.6m
May7.3m7.7m
Jun7.4m7.7m

The same data can also be a bar chart with two bars per month: choose Bar chart and keep the same data.

Pie chart: parts of a whole

Use pie charts only for parts of one whole (they should add up to 100%) and with 6 slices or fewer. Smaller slices beyond that are grouped as “Other” automatically.

Rent or mortgage, 38
Food, 14
Transport, 11
Energy, 9
Savings, 8
Everything else, 20
Example: where a monthly budget goes
Rent or mortgage: 38% (38%)Everything else: 20% (20%)Food: 14% (14%)Transport: 11% (11%)Energy: 9% (9%)Savings: 8% (8%)
  • Rent or mortgage 38%
  • Everything else 20%
  • Food 14%
  • Transport 11%
  • Energy 9%
  • Savings 8%
Show the data
ItemExample: where a monthly budget goes
Rent or mortgage38%
Food14%
Transport11%
Energy9%
Savings8%
Everything else20%

Doughnut chart: parts of a whole, with the total

Same data format as a pie chart. The total appears in the middle.

Doctors, 120
Nurses, 340
Radiographers, 45
Admin, 95
Example: staff in an imaging department
Nurses: 340 (57%)Doctors: 120 (20%)Admin: 95 (16%)Radiographers: 45 (8%)600
  • Nurses 57%
  • Doctors 20%
  • Admin 16%
  • Radiographers 8%
Show the data
ItemExample: staff in an imaging department
Doctors120
Nurses340
Radiographers45
Admin95

Histogram: how a list of numbers is spread out

A histogram drawn on a whiteboard with a person pointing at it
An illustration inserted with the Image from bank block.

Just list the numbers, one per line or separated by commas. The site sorts them into groups. Leave number of groups empty to choose automatically, or set it (e.g. 6).

2, 3, 3, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 11, 12, 12, 13, 15, 16, 18, 21, 24, 26, 30
Example: weeks waited for a scan (28 patients)
051015051015202530350 weeks to 5 weeks: 45 weeks to 10 weeks: 1210 weeks to 15 weeks: 515 weeks to 20 weeks: 320 weeks to 25 weeks: 225 weeks to 30 weeks: 130 weeks to 35 weeks: 1
Show the data
RangeCount
0 weeks to 5 weeks4
5 weeks to 10 weeks12
10 weeks to 15 weeks5
15 weeks to 20 weeks3
20 weeks to 25 weeks2
25 weeks to 30 weeks1
30 weeks to 35 weeks1

Tips

  • Don’t put commas inside numbers. Write 12500, not 12,500, because the comma separates the columns. (Pasting from a spreadsheet is fine: those use tabs.)
  • £, $ and % signs in the data are fine; they’re ignored when reading the numbers. Use the Unit box to show them.
  • Long labels are shortened under the chart; the full label is in “Show the data”.
  • Up to 5 lines or bar groups per chart. More than that is hard to read, so split it into two charts.
  • Check the chart on your phone after saving: if labels crowd, use shorter labels (e.g. “Jan” instead of “January”).

Sources

  1. All figures in this article are invented for illustration