Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

Choosing the right chart

After this lesson: I can choose the right chart for a question about data.

40 min lessonNo commands

Five charts, one question

A café chain's owner asks: "Which branch sold the most last month?"

A new analyst sends a pie chart with twelve thin slices. The owner cannot tell the slices apart and asks again.

The numbers were right. The chart was wrong for the question.

By the end of this lesson

Note

I can choose the right chart for a question about data.

Key words

WordWhat it meansExample
Bar chartbars whose length shows a value
Line chartpoints joined to show change over time
Pie charta circle cut into parts of a whole
Scatter plotdots that show how two values relate
Axisthe scale along one edge of a chart
Histogrambars that count values in each band0 to 10 minutes

The cells students fill in are left blank in this preview.

Start from the question

Every chart answers one kind of question. So read the question first, and pick the chart second.

If it says "which is biggest", you are comparing things: use a bar chart. If it says "how has it changed", you are looking at time: use a line chart.

The table below gives the five questions you meet most at work.

Which chart for which question

The question asksUseCafé example
Which is biggest?Bar chartSales at each branch
How has it changed?Line chartSales each month
What share of the whole?Pie chart, few partsHot and cold drinks
Do two things move together?Scatter plotTemperature and iced drinks sold
How are values spread?HistogramMinutes each customer waited

The cells students fill in are left blank in this preview.

A bar chart compares

In a bar chart, each bar is one thing, such as one branch. Its length is its value.

The eye compares lengths quickly, so the biggest and the smallest stand out. Put the bars in order of size when the order of the names does not matter.

The code below draws a bar chart with text, one # for every 2 coffees.

Draw a bar chart with text

Code: python
# Coffees sold yesterday at each branch of a cafe chain.
branches = ["Leeds", "York", "Hull", "Bath"]
sold = [42, 30, 18, 36]

# One # for every 2 coffees, so the bars fit on the screen.
for i in range(len(branches)):
    bar = "#" * (sold[i] // 2)
    print(branches[i].ljust(6), bar, sold[i])

# Add a branch "Ely" that sold 24, then press Run.

A common mistake

Warning

Many people think a bar chart's axis can start at any number. It must start at zero, because a bar's length is its value. Start the axis at 40 and a branch selling 42 looks twice the size of one selling 41.

Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.