Pie charts

This module should take 30 minutes to complete.

When to use pie charts

Pie charts can be useful when showing part-to-whole relationships.

This is because these charts clearly show that the ‘parts’ add up to the ‘whole’.

They can also help to break up a series of bar and line charts in a report.

However, you should be aware that pie charts are not the best in terms of accessibility as they are hard to understand when magnified.

Pie charts should only be used when:

  • there are five categories or fewer
  • the categories sum to a meaningful whole (you can combine categories when appropriate, but never remove a category from the ‘whole’)
  • there is a dominant category (if several categories are a similar size, use a bar chart instead)

Pie charts when there is a dominant category

Figure 1: Questions in a Maths exam by whether they were answered, fictional school, 2022 (pie and bar chart comparison)

Larger version of figure 1.

Figure 1 shows a pie chart and a bar chart displaying the same fictional data about questions answered in a Maths exam. It shows 82% of the questions were answered and 18% were not.

This data has a dominant category so the pie chart is just as good at getting the message across as a bar chart.

Back to top of page

When not to use pie charts

Do not use pie charts when there are small differences between categories

Figure 2: Favourite animals of 6 year olds, UK, 2022 (pie and bar chart comparison)

Larger version of figure 2.

The figure shows a pie chart and a bar chart displaying the same fictional data of favourite animals of six year olds. Five categories are shown: dog, cat, hamster, dolphin and other. There is a red cross above the pie chart and a green tick above the bar chart.

There is no dominant category in this data. In this case, the bar chart shows the small differences between the categories more clearly than the pie chart.

Do not use pie charts if there is no ‘whole’ and lots of categories

Figure 3: Top 20 towns or cities visited for at least one night in 2021, excluding London

Larger version of figure 3.

This figure shows a pie chart displaying information about the top 20 towns or cities visited for at least one night in 2021 (excluding London). There is a red cross above the chart.

Source: Travel trends 2021 from the Office for National Statistics

A pie chart is not suitable for this data as the data does not add up to a whole. It only shows the top 20 towns or cities, not all of them.

It is also very difficult to:

  • match the labels to the sectors
  • read the sector labels
  • clearly compare the sector sizes
  • pick colours that meet the accessibility requirements of having enough contrast with the white background and the adjacent sector

Do not use pie charts for time series data

Figure 4: Percentage three sectors contribute to profit, fictional retail company, 2015 to 2020, (pie charts)

Larger version of figure 4.

This figure shows six pie charts. Each one displays the fictional percentage that three sectors: food, drinks and clothes contributed to profit of a fictional retail company for each year between 2015 and 2020. There is a red cross above the charts.

Pie charts are not a good way to communicate time series data.

It is difficult to understand what has happened to the size of the sectors over time.

A stacked bar chart would be a better way of displaying this part-to-whole data over time.

Figure 5: Percentage three sectors contribute to profit, fictional retail company, 2015 to 2020 (stacked bar chart)

Larger version of figure 5.

This figure shows the same data as in figure 4 but this time a stacked bar chart is used instead of a series of pie charts.

This presentation makes it easier to see the changes over time.

Back to top of page

Pie chart formatting to avoid

Do not use 3D pie charts

You should never use any 3D charts. They distort the data. In pie charts the 3D effect distorts the size of the sectors.

Figure 6: Fictional data showing answers to a simple yes or no question

Larger version of figure 6.

The figure shows two pie charts showing that 18% of answers were “Yes” and 82% were “No”.  One is a 3D pie chart and one is a 2D pie chart. The 3D pie chart has a red cross above it and a 2D one has a green tick above it.

When comparing the pie charts, the 3D one makes the No sector seem bigger and the Yes sector seem smaller. This is because the 3D effect gives more of the space on the graphic to the No sector and less to the Yes sector.

Do not explode pie charts

Figure 7: Percentage three sectors contribute to profit, fictional retail company, 2020

Larger version of figure 7.

This figure shows a pie chart with three sectors: drinks, clothes and food. The pie chart has been exploded so the sectors are all separated from each other. The drinks sector is exploded slightly more than the others. There is a red cross above the chart.

Do not use exploded pie charts. They make it harder to compare the sectors as they no longer all have the same centre point.

Drag and drop exercise

Test your pie chart knowledge so far.

Fill in the blanks in the text with the following words.

Words to choose from

  • Sector.
  • Distorts.
  • Five.
  • Labels.
  • Bar.
  • Centre.
  • Dominant.

Text

Pie charts should only be used when there are *blank* categories or fewer. If a pie chart is used for more categories it can be very difficult to compare *blank* sizes and match the *blank* to the sectors.

There should always be a *blank* category in a pie chart. If several categories are a similar size, you should use a *blank* chart instead.

Do not use 3D pie charts as the 3D effect *blank* the size of the sectors. Do not use exploded pie charts either as the sectors no longer have the same *blank* point which makes it harder to compare the sectors.

Pie charts should only be used when there are five categories or fewer. If a pie chart is used for more categories it can be very difficult to compare sector sizes and match the labels  to the sectors.

There should always be a dominant category in a pie chart. If several categories are a similar size, you should use a bar chart instead.

Do not use 3D pie charts as the 3D effect distorts the size of the sectors. Do not use exploded pie charts either as the sectors no longer have the same centre point which makes it harder to compare the sectors.

Back to top of page

Colours

The contrast ratio between adjacent colours in charts needs to be at least 3 to 1. This includes the contrast of chart elements with the background colour.

With pie charts this is always possible when you have an even number of sectors as you can alternate between a dark colour and a light colour – see the pie charts with two and four sectors in figure 8.

It is not possible when you have an odd number of sectors– see the pie chart with three or five sectors in figure 8.

You should always aid users by putting a white border around each sector to enhance the outline and limit the issues caused by colour contrast.

Earlier modules of this e-learning talk in more detail about digital accessibility, colours and the colour palettes we have developed. You can also see our colours guidance for further information on colour palettes.

Figure 8: Pie charts and colours

Larger version of figure 8.

This figure shows four pie charts, one with two sectors, one with three, one with four and one with five. These illustrate the colour contrast issues already described.

Quick practice on adding white borders to pie chart sectors (PPTX, 73KB)

This activity shows you how to add white borders to pie chart sectors in Microsoft Office programs.

Please email Analysis.Function@ons.gov.uk if you have any problems accessing or using this file.

Back to top of page

Labelling

Always label pie chart sectors just outside the sector instead of directly on the sectors.

Text on sectors can get squashed and cause extra complications with the colour contrast of text against the background colour.

We also advise you to put the specific percentage next to the label in round brackets for extra clarity.

Figure 9: Questions in a Maths exam by whether they were answered, fictional school, 2022 (labelling example)

Larger version of figure 9.

Figure 9 illustrates how to label sectors in pie charts. Both labels sit just outside the sectors.

Back to top of page

Tree map alternative

Static tree maps are similar to pie charts and similar care should be taken with them.

You should only use them when:

  • there are five categories or fewer
  • the categories sum to a meaningful whole (never remove a category from the ‘whole’)
  • there is a dominant category (if several categories are a similar size, use a bar chart instead)
  • enough contrast can be maintained between adjacent colours (including contrast with the background colour) – remember adjacent elements in charts need at least a 3 to 1 contrast ratio
  • enough contrast can be maintained between label text and background colour – remember text needs at least a 4.5 to 1 contrast ratio with the background colour

Figure 10: Percentage five sectors contributed to profit, fictional retail company, 2020

Larger version of figure 10.

The figure shows a tree map with five sectors: drinks, clothes, electronics, food and books.

This tree map breaks some of our rules. For example, there are three similarly sized areas and it is hard to rank them in terms of size.

Also, the light purple and turquoise sectors would not have enough contrast to meet digital accessibility requirements. This is helped by the white outlines but may still cause issues for some users.

Note that interactive tree maps are different. They are a good way to show breakdowns from large categories into much smaller ones. But the accessibility of the functionality must be assessed.

Back to top of page

Quiz

Try these questions to test your knowledge from this module

 

Download a plain text version of module 9 quiz (ODT, 8KB)

End of module 9

Next, module 10: Publishing charts

Back to landing page.

Back to top of page
  • If you would like us to get in touch with you then please leave your contact details or email Analysis.Function@ons.gov.uk directly.
  • This field is for validation purposes and should be left unchanged.