What is a pie chart?
A pie chart shows the relationship of parts to the whole for a categorical variable by depicting a circle, or pie, divided into segments. The size of each segment, or slice of the pie, represents the proportional contribution of a specific category to the whole.
How are pie charts used?
Pie charts help you understand the parts-to-a-whole relationship, particularly when visualizing a small number of categories and the goal is to provide a general sense of their relative contributions to the whole.
What are some issues to think about?
Pie charts are used for categorical data, including nominal and ordinal data. While there are certainly valid use cases for a pie chart, there are a variety of situations where they are not the best choice. For example, when your variable comprises many categories, when precise numerical comparisons are needed, or when it's important to show changes over time, a bar chart or line graph may provide a better visualization of your data.
Pie charts show the parts-to-whole relationship
A pie chart is a circle that is divided into areas, or slices. Each slice represents the count or percentage of the observations of a level for the variable. Pie charts are often used in business. Examples include showing percentages of types of customers, percentage of revenue from different products, and profits from different countries. Pie charts can be helpful for showing the relationship of parts to the whole when there are a small number of levels. For example, a good pie chart might show how different brands of a product line contribute to revenue, as seen in Figure 1.
The pie chart in Figure 1 shows that nearly half of the revenue is from the the Salon line of products, which is larger than the percentage of revenue from the other product lines. The Budget line of products has the smallest revenue percentage. With a pie chart, we focus on the parts-to-whole relationship.
Pie charts are best created using a basic two-dimensional format as shown in the example below. Using a three-dimensional pie chart often adds confusion and is not recommended. The 3D areas do not add any more information about the data, yet add another chart feature for viewers to visually interpret – and perhaps misinterpret.
Pie chart examples
Example 1: Basic pie chart
Figure 2 shows a pie chart for the classes of passengers on the Titanic. The goal is to show that over half of the passengers had third-class tickets (least expensive). The other passengers are nearly evenly split between first- and second-class tickets. The goal is not to focus on specific percentages but on the relationship of parts to the whole.
Example 2: Bar chart shows similar values
When values for a parts-to-whole relationship are very similar, pie charts are not the best choice. Look at the pie chart for the Titanic in Figure 2. When the goal is to show "nearly half" of the passengers were in either first or second class, the pie chart is helpful. When the goal is to show more detail, a bar chart is easier to visually interpret. The graph in Figure 3 shows the same data plotted in a bar chart.
In Figure 3, we can easily see that there are fewer passengers in second class than in first class, since our eyes are better at comparing length in a bar chart than angles and areas in a pie chart.
Example 3: Use a bar chart for many levels
When we want to show the parts-to-whole relationship for a variable that has many levels, pie charts are often not the best choice. The pie chart in Figure 4 shows the parts-to-whole relationship for many categories of movies, but this visualization of the data is difficult to interpret.
In a pie with so many slices, it difficult to process the details of the parts-to-whole relationship. Also, as in Figure 2, the difference between similarly sized categories is difficult to distinguish. For example, are there more Thriller or Animation movies? It’s hard to determine from a pie chart.
Figure 5 is a bar chart for the same data.
The bar chart shows the parts-to-whole relationship for the many genres better than the pie chart. We can also see that there are more Thrillers than Animation movies. We could further improve this bar chart by adding labels to the bars, or by sorting the bars in order of percentages instead of in alphabetical order. In Figure 6, a sorted bar chart easily illustrates the parts-to-whole relationship and the fact that there are more Thrillers than Animation movies.
Example 4: Use multiple pie charts to show changes in parts-to-whole relationships
Multiple pie charts are helpful when the goal is to show changes in parts-to-whole relationships, especially when the goal is not to focus on specific details. Figure 7 shows historical data for smart phones, starting when the first smart phones were released in 2006. Each pie shows the parts-to-whole relationship of market share by operating system for a specific year.
We can see how the Windows operating system started out as half of the market share in 2006 and ended with a much smaller market share in 2011. Similarly, we can see that the Android operating system was not in the market until 2008 and comprised more than half the market by 2011. The goal here is to show the parts-to-whole relationship changing over time. If the goal is to show the changes over time for each operating system, a line graph is a better choice.
Pie charts and types of data
Categorical data: appropriate for pie charts
Pie charts make sense to show a parts-to-whole relationship for categorical data, including ordinal and nominal data. The slices in the pie typically represent percentages of the total.
With ordinal data, a type of categorical data, the sample is often divided into groups, and the responses have a defined order. For example, in a survey where you are asked to give your opinion on a scale from “Strongly Disagree” to “Strongly Agree,” your responses are ordinal.
With nominal data, also a type of categorical data, the sample is divided into groups but without any particular order. Country of residence is an example of a nominal variable. You can use the country abbreviation or you can use numbers to code the country name. Either way, you are simply naming the different groups of data.
Continuous data: choose another chart type
Usually, pie charts do not make sense for continuous data. Since continuous data are measured on a scale with many possible values, showing a parts-to-whole relationship does not make sense. Some examples of continuous data are:
- Blood pressure