Pie

Pie and donut charts split a whole into slices, to show how each part contributes to a total.

LLMs

Usage

When a pie or donut chart is the right choice, when another chart reads better, and how to draw one that tells the truth. The same rules hold in every chart library. For picking between chart types in general, see Choosing a chart.

What it is for

A pie chart shows how one whole splits into a few parts: traffic by source, storage by file type, tickets by channel. Each slice is a part, and its angle is the part's share of the total. A donut is the same chart with a hole in the middle, which leaves room for the total.

When to use

  • The parts add up to one meaningful total, and that total is 100%.
  • There are two to five parts.
  • The reader asks about rough shares: is it half, about a quarter, the biggest by far.
  • One part is the point, such as the share of paid plans, and the rest are context.

Use something else when

  • There are more than about five parts. Use a sorted bar chart, or group the smallest parts into Other.
  • The parts are close in size and the reader must rank them. Use a bar chart, where small differences in length are easy to see.
  • You compare the same split across groups or periods. Use a 100% stacked bar chart, one bar per group, instead of several pies.
  • The parts do not add up to a whole, such as answers to a question that allows several choices. Use a bar chart.
  • A value can be negative, such as profit by product. Use a bar chart with a zero line.
  • The parts are nested, such as categories and their subcategories. Use a treemap or a sunburst.
  • You show progress toward one goal. Use a progress bar or a progress ring.

How it reads

A slice encodes its value as angle, arc length and area at once. People judge these less accurately than length on a shared baseline, so two slices of 23% and 27% look the same. They do read halves and quarters well, because the 12, 3, 6 and 9 o'clock positions are easy to spot. That is why a pie works for a few clear parts and fails for close ones.

Do it well

  • Keep it to five slices or fewer. Group the smallest into one slice named Other, and put Other last.
  • Start the first slice at 12 o'clock and go clockwise. Readers start there, and the first edge lines up with a quarter mark.
  • Sort the slices from largest to smallest, unless the parts have their own order, like age bands or the steps of a funnel.
  • Label each slice with its percentage, next to the slice. Give the absolute values in a tooltip or a table.
  • Make the percentages add up to 100. Rounding can give 99 or 101, so adjust the largest slice or show one decimal.
  • Separate the slices with a thin line in the background color, so neighbors with close colors stay apart.
  • In a donut, put the total or the one number that matters in the hole, and keep the ring wide enough to read the angles.

Pitfalls

  • Several pies side by side to compare. The reader cannot match angles across circles. Use a 100% stacked bar chart, or grouped bars.
  • Slices of almost the same size. The chart says "about equal" even when the order matters. Use a sorted bar chart.
  • A legend as the only label. The reader looks back and forth to match colors. Label the slices directly.
  • 3D pies and tilted pies. Slices at the front look larger than slices of the same value at the back.
  • Several slices pulled out of the pie. Pull out one slice at most, the one you want the reader to see.
  • A thin donut with a large hole. The ring turns into arcs whose lengths are hard to compare.

Variants

  • Pie: the full circle, for two to five parts.
  • Donut: a pie with a hole, which holds the total or one key value.
  • Donut with gaps: slices spaced apart with rounded ends, a lighter look for dashboards.
  • Pulled-out slice: one slice drawn larger or offset, to point at it.
  • Nested rings: an inner ring of groups and an outer ring of their parts. Past two rings, use a sunburst or a treemap.

Compared with similar charts

  • Against a bar chart: bars show the same values more accurately and hold any number of categories. A pie only adds the sense of one whole.
  • Against a 100% stacked bar: the stacked bar shows the same shares and lines several groups up for comparison.
  • Against a treemap: a treemap holds many parts and nested parts, where a pie holds a few.
  • Against a waffle chart: a grid of 100 squares shows shares as counts, which are easier to read than angles.
  • Against a radial bar chart: radial bars compare separate values around a circle and do not add up to a whole.