Showing amounts and proportions: bars, dots, pies and treemaps, and whether the pie chart is really that bad
TL;DR
Difficulty: Beginner
- Before choosing a chart, finish the sentence: the reader compares each piece with what? With the whole, the other pieces, itself over time, or pieces inside pieces. Each needs a different display.
- For amounts, use bars sorted by value and starting at zero, because the eye judges length on a common scale best and the length is the message. Use dots when all values are large and close, and a heatmap for big grids.
- The pie is a specialist, not a villain: use it for one whole, one moment, two or three parts and a simple fraction. Otherwise bars win.
- A share can fall while the amount grows, so show amounts before 100% stacked bars.
- For parts inside parts, a mosaic plot or treemap with numbers written in; on a slide, two flat charts in sequence.
What to read first
Most business charts answer "how much?" or "what share?", and the two look alike while asking different things of the eye. Here is how to show both well, from sorted bars to treemaps, why bars start at zero, and an honest answer to the pie chart argument, all worked through on one coffee roaster's revenue.
How much, and what share: two questions that look alike
Most business charts answer one of two questions. "How much?" asks for an amount: revenue per channel, orders per coffee, cafés per region. "What share?" asks for a proportion: which part of the whole each piece makes up. The two look alike because the same numbers can answer both. They are not alike, because the reader's eye has to do different work for each, and a chart that suits one can quietly fail the other.
This chapter covers the displays for both, settles the pie chart argument with the research on both sides, and closes with one worked example that ends in a recommendation you can copy.
The method comes from three books I lean on throughout this series: Claus Wilke's chapters on amounts, proportions and nested proportions123, Cole Nussbaumer Knaflic's chapter on choosing an effective visual4, and Heike Hofmann's chapter on mosaic plots in the Handbook of Data Visualization5. Where the wider research adds something, I bring it in and cite it.
If you have not read the previous chapter on scales, axes and coordinate systems, skim it first. Everything here builds on one idea from it: a chart maps numbers to something the eye can measure, and some of those somethings are measured far more accurately than others.
Example: the business behind every chart in this series
The example business is invented. Ridgeway Coffee is a speciality coffee roaster in Oxford (ridgewaycoffee.example). It sells one off orders online, coffee subscriptions, and wholesale to cafés. Revenue is £2.4 million a year: subscriptions 45% (£1.08 million), one off online orders 25% (£600,000) and wholesale 30% (£720,000). Gross margin is 48%. There are 3,600 active subscribers on two plans, "Usual" (the same coffee every time) and "Explorer" (a different coffee each time). Ridgeway roasts 18 coffees and supplies 140 cafés. Maya, the founder, keeps asking one question: "Should we push Explorer harder, or is it costing us customers?" Joe, the analyst, makes the charts. In this chapter, Maya wants to see where the money comes from.
Ask "compared with what?" before you pick a chart
Here is the test I use before choosing any display of amounts or shares. Every chart asks the reader to compare something. So before you choose, finish this sentence: "The reader needs to compare each piece with..."
- ...the whole. "Is subscriptions about half of revenue?" A pie or a single stacked bar can work, because both show the whole as one shape.
- ...the other pieces. "Is wholesale bigger than one off orders, and by how much?" Bars, sorted, from a common baseline. A pie fails here.
- ...itself at another time or in another group. "Did the subscription share grow this quarter?" Side by side bars, a 100% stacked bar with two parts, or a line. A row of pies fails here.
- ...pieces inside pieces. "Which coffees drive wholesale, and how big is wholesale?" A treemap or a mosaic plot, with numbers written on.
The test works because every display makes one comparison easy and the others hard. Wilke makes the same point in his own words: no proportion display beats the others in every case, and the right one depends on the feature of the data you need to show2. "Compared with what?" turns that advice into a question you can answer in ten seconds.
Example: Maya's four questions
Maya's request hides four questions, and each compares something different:
| Maya's question | Compared with what? | Display that makes it easy |
|---|---|---|
| "Is subscriptions really almost half of the business?" | the whole | a pie of three slices, or one stacked bar |
| "Which coffees earn the most?" | the other pieces | sorted bars |
| "Did the channel mix change over the year?" | itself over time | grouped bars of amounts, plus the shares |
| "Within each channel, how much comes from the three big coffees?" | pieces inside pieces | a mosaic plot or treemap, labelled |
A single "revenue breakdown" chart cannot answer all four, and Joe knows why before he has drawn anything.
Why bars win for amounts: the eye measures length better than area
Bars are the default for amounts for a reason that has nothing to do with fashion. In 1984 William Cleveland and Robert McGill asked people to judge the ratio between two marked values shown in different ways, and measured the errors6. Judgements of position along a common scale were the most accurate, then position along scales that are not aligned, then length, direction and angle, then area, then volume. Shading and colour saturation came last. A bar chart puts every value on a common scale and lets the eye compare where the bars end. That is the most accurate judgement people make.
In 2010 Jeffrey Heer and Michael Bostock repeated the experiment with participants recruited online through Mechanical Turk and found the same order7. They also tested rectangles of the kind a treemap uses, and found that area judgements on rectangles were about as inaccurate as on circles.
Wilke gives the reason in plain terms: human perception judges distances well and areas poorly, so a value shown as one distance (a bar's length) reads more accurately than a value shown as an area built from two distances (a pie wedge or a treemap tile)8. Knaflic adds a point about habit. Bar charts are so common that nobody has to learn how to read one, so the reader spends their attention on the data instead of on the chart4. In her words, "Sometimes bar charts are avoided because they are common. This is a mistake."
Example: the same three numbers, two ways
Ridgeway's channel revenue is £1.08 million, £720,000 and £600,000. The question is "how much bigger is wholesale than one off orders?". The true answer is 20%, because £720,000 divided by £600,000 is 1.2. In a pie, the two slices are 108 and 90 degrees of the circle, and almost nobody can turn two wedges into a ratio. In bars on a common scale, the end of the wholesale bar sits a fifth higher than the end of the one off bar, and the eye reads that directly. Same numbers, different accuracy, as the research predicts.
Bars start at zero, because the length is the message
A bar shows its value twice: once at its end, once in its length. If the axis starts at zero, both say the same thing. If it starts anywhere else, the end still tells the truth and the length lies, and the length is what the eye reads.
Carl Bergstrom and Jevin West named this the principle of proportional ink: when a shaded area stands for a number, its size should be proportional to that number9. Wilke builds a whole chapter on it and states the rule plainly: bars on a linear scale start at zero8. Knaflic gives the same rule for the same reason: the eye compares the ends of bars against the full length, so a bar that does not start at zero creates a false comparison4. Bergstrom and West also explain why the rule does not bind line charts: a line encodes values by position, not by shaded area, so a line may start above zero as long as the reader is told. A shaded area under that line, however, brings the rule back.
Edward Tufte gave the distortion a number, the lie factor: the size of the effect shown in the graphic divided by the size of the effect in the data10. Anything far from 1 misleads.
where is the lie factor, is the relative difference the reader sees in the drawing (here, between bar lengths) and is the relative difference in the actual numbers. Foundations: percentages has the groundwork for relative differences.
Example: the wholesale bar that grew twelve times
Joe's spreadsheet chose an axis for the channel bars that starts at £550,000, because that "uses the space better". Work out what the reader sees, step by step.
- In the data, wholesale (£720,000) is 20% above one off orders (£600,000). So .
- On the drawing, the wholesale bar runs from £550,000 to £720,000: a length of 170 units (in thousands of pounds). The one off bar runs from £550,000 to £600,000: 50 units.
- The visible difference is , so . The wholesale bar looks 3.4 times as long as the one off bar.
- The lie factor is .
The chart exaggerates the gap twelvefold. Maya would walk away thinking one off orders barely matter. Joe resets the axis to zero, and the gap shrinks back to what it is: wholesale is a fifth bigger, not three times bigger.
If the differences you care about are small compared with the values themselves, the answer is not a truncated bar. It is a different display: a dot plot (below), or a bar chart of the differences themselves, which Wilke recommends for exactly this case8.
Sort the bars, unless the order already means something
The second most common fault after a truncated axis is a bar chart in alphabetical order, or in whatever order the database returned. Wilke's advice is to order bars by their values whenever the categories have no natural order, and to keep the natural order whenever they do (age bands, months, sizes)1. Knaflic adds why the direction matters: readers start at the top left and scan in zigzags, so the first bar they meet should be the one you most want them to see, usually the largest4.
Two related rules, both from the same reasoning:
- Horizontal bars for long labels. Rotated labels are hard to read. Turn the chart on its side and every label reads left to right, before the bar it names. Both Wilke and Knaflic make this their default for categorical data with long names14.
- "Other" goes last, whatever its size. This one is mine. A bucket called "Other" is not a category, it is a remainder. Sorting it into the middle because it happens to be large invites the reader to compare it with real categories, which it is not. Put it at the end, in a quieter colour, and say how many items it holds.
Example: Ridgeway's revenue by coffee origin
Ridgeway does not record revenue by origin in a ready report, so Joe derives it from the order lines. The split below is derived for this example. Three coffees lead: the house blend, a Colombian and an Ethiopian. Together they account for 61% of repeat orders, and, in Joe's derivation, 55% of revenue (a lower figure, because one off orders and wholesale spread more widely across the range).
In pounds, that is £576,000 for the house blend, £408,000 for the Colombian, £336,000 for the Ethiopian, then £216,000, £168,000, £144,000, £120,000 and £96,000, with £336,000 for the other ten coffees together. Notice that "Other" (14%) ties with the Ethiopian. Sorted strictly by value, it would sit third. Sorted by meaning, it sits last, and the chart tells the true story: three coffees carry the business, and a long tail of fifteen shares the rest. The three leaders are highlighted. The highlight is the point of the chart, and the grey bars are the context. (Chapter 2 of this series, on how people read charts, explains why a single highlighted colour is seen before anything else.)
Dot plots when every bar would be long
Sometimes all the values sit far from zero and the differences between them are what matters. Bars would have to start at zero and would all end up nearly the same length, so the eye would see a row of almost identical blocks. Wilke's answer is the dot plot: a single dot at each value, on an axis that need not start at zero, because a dot has no length to lie with1. William Cleveland proposed the dot chart in 1984 for exactly this kind of data, a labelled list of values that would be awkward as bars11.
The same ordering rule applies. A dot plot in alphabetical order turns into a scattered cloud. Sorted by value, the dots form a clean curve, and gaps and outliers jump out.
Example: median order value by coffee
Joe wants to know whether some coffees attract bigger online orders. Ridgeway's overall median online order is £32. For each coffee, he takes the median value of the orders that contain it (derived for this example):
| Coffee | Median order value |
|---|---|
| Kenya | £38 |
| Rwanda | £37 |
| Ethiopia | £36 |
| Guatemala | £34 |
| Colombia | £33 |
| Peru | £32 |
| Brazil | £31 |
| House blend | £30 |
As bars from zero, these eight values would range from 30 to 38 units long: eight bars that look nearly the same. As a dot plot on an axis from £28 to £40, each dot sits clearly apart, sorted from Kenya at the top to the house blend at the bottom. The pattern is obvious at once: the African coffees sit in larger baskets, the house blend in the smallest. Joe labels the axis clearly and draws a faint line at the overall median of £32 as a reference.
Grouped and stacked bars: two categories at once
Once you add a second category, say channel and quarter, bars come in two flavours.
Grouped bars put the bars for one category side by side within each group of the other. Every bar starts at zero, so comparisons within a group are accurate. The catch, as Wilke points out, is that the second category is read through colour and a legend, which takes more effort than reading position1. So put the comparison that matters most inside the groups, or use small separate charts, one per group, which need no legend at all.
Stacked bars put the pieces on top of each other. Wilke's rule for when that is allowed is simple and often broken: stack only when the sum of the pieces is itself a meaningful amount1. Revenue by channel stacks, because the stack is total revenue. Average order values do not stack, because the sum of two averages means nothing. Knaflic adds the cost: only the bottom piece and the total share a baseline, so every piece in the middle floats, and comparing it across bars is hard4.
Example: the channel mix through the year
Joe splits revenue by quarter. The quarters are uneven because of Christmas: December subscription sign ups run at 2.6 times the monthly average, and gift orders swell the one off channel. The quarterly figures below are derived for this example.
Quarterly revenue comes to £540,000, £560,000, £540,000 and £760,000, the year's £2.4 million. Grouped by quarter, the chart answers "which channel led each quarter?": subscriptions, every time. For "how did each channel move through the year?", Joe would group by channel instead. Same data, different easy comparison.
A stacked version is allowed, because revenue adds up, and it would show the Christmas peak. But wholesale, on top, would float on a different baseline each quarter, and its growth from £167,000 to £205,000 would be hard to see. Joe keeps the grouped bars and puts the totals in the caption.
Heatmaps when there are too many categories for bars
Bars and dots run out of room. Twenty groups of twenty values make a grouped bar chart nobody can read. A heatmap maps each value to a colour shade in a grid of rows and columns instead of to a position. Wilke is candid about the trade: you lose the ability to read exact values and gain a view of broad patterns across a large table1. Knaflic presents the heatmap as a table with colour cues: keep the numbers, shade the cells, and add a key explaining which shade means high4. And the ordering rule applies to rows and columns too. Wilke shows that the same heatmap tells a different story depending on whether the rows are sorted by the final value or by when the pattern began1.
The chapter on colour covers which colour scale to use: for a heatmap of amounts, a sequential scale, light for low and dark for high.
Example: 140 cafés, twelve months
Joe wants to see which wholesale cafés order steadily and which have gone quiet. That is 140 cafés times 12 months: 1,680 numbers. As bars, it is impossible. As a heatmap, it is one screen: one row per café, one column per month, darker cells for more kilograms ordered.
The ordering decides what Maya sees. Sorted by total volume, the eye reads size. Sorted by the month each café last ordered, the cafés that went quiet in the autumn collect at the bottom as a pale block: a list of phone calls for the wholesale manager. Joe sorts by last order, because the question is "who is slipping away?", and labels only the palest rows.
Proportions: a share is an amount divided by its whole
Now the second question, "what share?". A proportion turns every amount into a fraction of one total:
where is the share of piece as a percentage, is the amount of piece , is the number of pieces, and is the total of all pieces. By construction, the shares add up to 100. Foundations: percentages explains the arithmetic, and Foundations: ratios and rates the difference between a share and a rate.
That one line explains most of what goes wrong with proportion charts. A share hides the size of the whole, so a growing piece can show a shrinking share. And when shares change, people confuse percentage points (the difference between two shares) with percentage change (the relative change in an amount). Proportion displays have to work around both.
Example: Ridgeway's channel shares
Plug in the year's figures. The total is .
- Subscriptions: , so 45%.
- One off orders: , so 25%.
- Wholesale: , so 30%.
45 + 25 + 30 = 100. Three parts of one whole, one snapshot. Keep these three numbers in mind: they are exactly the kind of data the pie chart was made for.
Is the pie chart really that bad? The case against
The case against the pie is strong, and it is worth hearing in full.
Stephen Few's 2007 essay "Save the pies for dessert" is the classic statement12. He grants the pie its one built in strength: it says "part of a whole" without a word of explanation. Then he shows its weakness. People can judge a slice accurately only when it sits near 0%, 25%, 50%, 75% or 100%, helped by the familiar right angles of a circle. Anywhere else, the reader guesses. Once you label every slice with its value to rescue it, the numbers do the work and the circle is decoration. Few recommends bars on a percentage scale, with a title that names the whole.
Knaflic is blunter: she calls pie charts evil in her chapter on choosing a visual, and shows a tilted 3D pie in which the largest slice looks smaller than its neighbour4. Even flattened, she argues, a pie lets the reader see which slice is bigger only when the difference is large, and never by how much. She also rejects the donut chart, on the grounds that comparing arc lengths is even harder than comparing slices. Tufte, in 1983 and again in 2001, wrote that a table is nearly always better than a pie chart, and several pies are worse still, because the reader must compare slices scattered across separate circles10.
And the perception research backs the core point. Angle and area sit below length and position in Cleveland and McGill's ranking6, and Heer and Bostock's replication kept that order7.
Example: where a pie fails at Ridgeway
Joe tries a pie of the nine coffee groups. Kenya (6%), Peru (5%) and Rwanda (4%) become thin slivers one point apart that nobody can rank by eye, and "is Brazil bigger than Guatemala?" needs the labels. Nine slices, close values, comparisons between pieces: the pie at its worst. The sorted bars answer all of it without a label.
The case for the pie, and my view
The other side is better evidenced than its reputation suggests.
In 1991 Ian Spence and Stephan Lewandowsky ran a series of experiments comparing pies, bars and tables for proportion judgements13. They found little to choose between pies and bars, with the pie slightly ahead when the judgement was complex, such as comparing the sum of two slices with the sum of two others, and both charts well ahead of tables. They concluded that the traditional prejudice against the pie is misguided. Few reports this result in his own essay and accepts it for that one task12. The debate is old: Walter Eells compared circles and bars for parts of a whole in 192614.
Newer work changed the explanation, too. Drew Skau and Robert Kosara tested which cue people actually read in a pie: angle, arc length or area15. Angle turned out to be the least important of the three, and donut charts were read as accurately as pies, which contradicts the common advice against donuts. A follow up study by Kosara and Skau found that the decorative variants (exploded slices, an enlarged slice, elliptical or square "pies") all increased reading errors, and the ones that distort the shape most did worst16. Their recommendation was to drop those variants in favour of plain pies and donuts.
Wilke takes the middle road. In his words, "none of these visualizations is consistently superior over any other"2. The pie shows the whole clearly, emphasises simple fractions such as a half or a quarter, and suits a tiny dataset. Stacked bars win for many sets of proportions or proportions over time. Side by side bars win when the parts must be compared with each other. His pie at its best shows two parties that together just pass a majority: "together, more than half" is visible at once.
The UK's Office for National Statistics reached a practical version of the same view in 2017: use a pie only for parts that add up to 100%, keep to about five or six categories, use a single dataset rather than rows of pies, sort the slices from 12 o'clock, label them directly, and never use 3D17. The Financial Times Visual Vocabulary lists the pie and the donut under "part to whole" alongside stacked bars, treemaps and waffle style grids, with a warning that slice sizes are hard to compare accurately18.
My view: the pie is not evil. It is a specialist. It answers one question well, "how does this part compare with the whole?", and it answers "how do these parts compare with each other?" badly. So use it when all three of these are true, and otherwise use bars:
- One whole, one moment. A single snapshot, not a series and not a row of pies.
- Two or three parts. At five or more, at least two slices will be close enough to defeat the eye.
- The message is a simple fraction. "Almost half", "a quarter", "together, more than half". If the point is a precise ranking or a gap of a few points, the pie is the wrong tool.
When you do use one: start at 12 o'clock, largest slice first, label the slices directly with name and percentage, no legend, no 3D, no exploded slices. A plain donut is fine if you want the total in the middle. The research does not support the claim that it reads worse.
Example: the pie that works at Ridgeway
The channel split passes all three conditions. One whole (the year's revenue), one moment (the last twelve months), three parts, and the message is a simple fraction: subscriptions bring in almost half the business.
Before reading a label, the eye sees the subscriptions slice stop just short of 6 o'clock (almost half) and one off orders fill a right angle (a quarter). That is all this chart is for. If Maya then asks how much bigger wholesale is than one off orders, that is a comparison between pieces, and Joe answers with bars or a sentence: "£120,000 a year bigger".
Stacked bars and 100% stacked bars for shares over time
When a share changes over time or differs between groups, a row of pies is the worst choice, for Tufte's reason: the reader must compare slices across separate circles10. The usual alternative is a sequence of 100% stacked bars, each bar scaled to the same height so every piece shows its share.
Wilke is careful about when this works2. With many pieces, the middle pieces shift up and down from bar to bar, so their changes are almost impossible to read. With two pieces, the problem disappears: one piece sits on the floor, the other hangs from the ceiling, and both have a fixed baseline. A reference line at 50% makes the crossing point visible. Knaflic makes the matching point for horizontal 100% bars: the leftmost and the rightmost piece each have a straight edge to compare against, which is why they suit survey scales from "strongly disagree" to "strongly agree"4. She also suggests stating the absolute totals somewhere on or near the chart, because a 100% bar hides them.
That last point is the trap. A share can fall while the amount grows. To see it you need the percentage change, which compares an amount with its earlier value:
where is the percentage change, is the amount in the later period and is the amount in the earlier period. A change in share, by contrast, is measured in percentage points: the plain difference between two shares. Foundations: percentages covers both.
Example: the subscription share that fell while subscriptions grew
Joe draws the channel shares by quarter, derived from the quarterly figures above.
Maya looks at it and frowns: "Subscriptions dropped in the fourth quarter?" They did not. Work it through.
- The subscription share fell from 46% in Q1 to 43% in Q4: a change of 3 percentage points.
- Subscription revenue was pounds in Q1 and pounds in Q4.
- Percentage change: . Subscription revenue grew by 31.6%.
- The share fell only because one off orders, swollen by Christmas gifts, grew even faster: from £124,200 to £228,000, an increase of 83.6%.
The chart was honest. It answered "what share?", and Maya read it as "how much?". So Joe shows the amounts first and the shares second, with the finding as the title: "Christmas gifts lift one off orders to 30% of the quarter, and subscriptions still grow by a third." The floating wholesale piece also shows Wilke's warning: its quieter movement is hard to judge.
Side by side bars when the parts must be compared with each other
If the reader's comparison is between the pieces, not with the whole, drop the stacking and put the shares next to each other on a common baseline. Wilke's case for side by side bars uses five companies of about equal size over three years: as pies or stacked bars the trends vanish, as side by side bars every rise and fall is plain2. The cost is that the whole is no longer visible as a shape. Few and Knaflic both suggest repairing that with words: a percentage axis and a title that names the whole, or a note that the parts add up to 100%124.
Example: which channel gained share at Christmas?
Maya's real question about the fourth quarter is "which channel gained share, and which lost?". That is a comparison of each piece with itself across two moments. Joe draws three pairs of bars, Q3 and Q4 side by side for each channel, on an axis from 0% to 50%:
| Channel | Q3 share | Q4 share | Change |
|---|---|---|---|
| Subscriptions | 47% | 43% | 4 points lower |
| One off orders | 21% | 30% | 9 points higher |
| Wholesale | 32% | 27% | 5 points lower |
Every pair starts at zero, so the eye reads each change directly: one off orders jump, the others step down. The title names the whole ("Share of quarterly revenue, by channel") and the caption names the amounts, so nobody repeats Maya's earlier misreading.
Waffle charts: counting instead of estimating
A waffle chart is a grid of usually 100 squares, each square 1%, coloured by category. It turns an area judgement into counting, and counting is something nearly everyone can do accurately. It also shows "part of a whole" as plainly as a pie, because the grid is visibly complete. Its limits are the pie's limits: a few categories, one whole, and values that round sensibly to whole percentages. It is a good choice for a slide in front of people who distrust charts, and for a single striking share.
Example: a waffle of the channel split
Joe sketches the channel split as a 10 by 10 grid, one square for each 1% of revenue: S for subscriptions, W for wholesale, O for one off orders.
S S S S S S S S S S
S S S S S S S S S S
S S S S S S S S S S
S S S S S S S S S S
S S S S S W W W W W
W W W W W W W W W W
W W W W W W W W W W
W W W W W O O O O O
O O O O O O O O O O
O O O O O O O O O O
Count it: four full rows and five squares of subscriptions (45), then wholesale for the next 30 squares, then one off orders for the last 25. Nobody has to estimate an angle. Anyone can count "four and a half rows" and arrive at 45%. The other side of that strength is that readers will count, so a waffle drawn by hand with one square too many gets caught. Generate it from the data.
Nested proportions: when parts have parts
Often the pieces have pieces: channels split into coffees, regions into cafés. Wilke calls these nested proportions and starts with two ways to get them wrong3. The first is a single pie whose slices mix two variables, so the slices add up to more than 100%, because every item is counted twice. The second is a bar chart of the same mixed categories: not technically wrong, but it hides the overlap and lets the reader assume the categories are separate. The cure is a display that shows explicitly how one breakdown sits inside the other.
Example: the double counted pie
Joe's first attempt shows "Subscriptions 45%, One off 25%, Wholesale 30%, Top three coffees 55%" in one pie. The slices add up to 155%. The software quietly rescales them, and the subscriptions slice now shows 29% of the circle. Every pound of revenue is in the pie twice, once by channel and once by coffee. The right question is not "what share is each?", but "within each channel, what share is the top three coffees?". That needs a nested display.
Mosaic plots: width for one variable, height for the other
A mosaic plot, introduced by John Hartigan and Beat Kleiner and covered in depth by Hofmann in the Handbook of Data Visualization, splits a rectangle into columns whose widths are proportional to the categories of the first variable, then splits each column by height into the categories of the second variable5. Hofmann explains what each dimension means: a tile's width is the share of the first variable, its height is the conditional share of the second within that column, and its area is the joint share of the whole5. Because the construction is hierarchical, the order of the variables changes what the plot emphasises, and choosing a good order is the main difficulty for newcomers. Wilke adds the condition that makes a mosaic valid: every variable must cover all observations, so every item lands in exactly one tile3.
Mosaic plots are rare in business slides, which is a pity: they answer "is the mix the same in every group?". If it is, the splits line up across the columns. If not, they step up and down.
Example: the top three coffees inside each channel
Joe derives, for this example, the share of each channel's revenue that comes from the three leading coffees: 52% in subscriptions, 58% in one off orders and 57% in wholesale. Check that it agrees with the overall 55%: . It does.
The mosaic has three columns, 45, 25 and 30 units wide. Each column is split at 52%, 58% and 57% of its height. The six tiles:
| Tile | Share of all revenue | Revenue |
|---|---|---|
| Subscriptions, top three coffees | 23.4% | £562,000 |
| Subscriptions, other 15 coffees | 21.6% | £518,000 |
| One off orders, top three coffees | 14.5% | £348,000 |
| One off orders, other 15 coffees | 10.5% | £252,000 |
| Wholesale, top three coffees | 17.1% | £410,000 |
| Wholesale, other 15 coffees | 12.9% | £310,000 |
The split line sits lower in the subscriptions column, the widest of the three. Subscriptions lean less on the three big coffees than the other channels do. That is no surprise once you remember that Explorer subscribers get a different coffee each time, and it gives Maya a first, careful clue for her standing question: Explorer is how the long tail of 15 coffees reaches customers at all. It is a clue, not an answer, and later chapters in the series test it properly.
Treemaps: nesting rectangles inside rectangles
A treemap was invented by Brian Johnson and Ben Shneiderman in 1991 to show where the space on a hard disk went19. It nests rectangles inside rectangles, each with an area proportional to its value. Hofmann shows that a mosaic plot is a special case of a treemap: any table can be drawn as a tree, but not every tree is a table, so treemaps handle ragged hierarchies that mosaics cannot5. Wilke's distinction is practical: a mosaic emphasises how the mix changes across one variable, a treemap emphasises the totals of the top level, and treemaps suit hierarchies where the pieces in one branch have nothing to do with the pieces in another, such as regions and the towns in them3.
Two warnings. First, a treemap is an area chart, so it inherits the area problem: Wilke shows differences looking smaller in a treemap than in bars of the same data8. Second, the shape of the tiles matters. The "squarified" layout by Mark Bruls, Kees Huizing and Jarke van Wijk keeps tiles close to square to make them easier to see and label20. Yet Heer and Bostock found that comparisons between perfectly square rectangles produced the largest errors of all the shape combinations they tested. That fits the idea that viewers lean on comparing side lengths, and two squares leave them nothing to compare7. The practical rule follows from both: write the numbers inside the tiles. Wilke recommends exactly that for all nested displays, so readers can check their impression against the values3.
Example: Ridgeway's revenue as a treemap
Joe describes the treemap before drawing it, which is a good habit for any complex chart. The outer rectangle is £2.4 million. It splits into three channel blocks, subscriptions taking 45% of the area, wholesale 30% and one off orders 25%. Inside each channel block sit tiles for the coffees, the three leaders large and the rest small. Each tile carries its name and its revenue, for example "Subscriptions, house blend" and its figure in pounds.
It shows the size of each channel and the dominance of the three coffees inside it, with no space wasted. It cannot show whether the Colombian earns more in wholesale or in subscriptions: those tiles sit in different blocks with different shapes, and only the written numbers settle it. So the treemap goes to the appendix as an overview, and the decisions rest on the sorted bars and the mosaic.
Parallel sets and sunbursts, and why most of them are hard to read
Two more nested displays appear in tools and dashboards.
Parallel sets, introduced by Robert Kosara, Fabian Bendix and Helwig Hauser in 2006, draw each categorical variable as a row of bars and connect them with bands whose widths show how many items flow from one category to the next21. They handle three or four variables, where a mosaic gives up. Wilke shows their weak point: the bands cross, and once colours change direction the picture becomes a tangle. His fixes are to put the variable that sets the colour first and to order the variables to minimise crossings3.
Sunbursts draw the hierarchy as rings: the inner ring is the top level, each outer ring splits the one inside it. John Stasko and Eugene Zhang studied them as a radial alternative to the treemap22. They look striking, and they combine the weaknesses of the pie and the treemap: angles and arcs instead of lengths, outer segments that grow larger simply because they are further out, and thin slivers that cannot be labelled. Wilke's comparison of a nested pie with the equivalent treemap comes down on the side of the treemap, for space and for labels3.
My rule of thumb for all of these: a nested display earns its place in exploration, where you click and filter it yourself. In a report or on a slide, where the reader has seconds, break the hierarchy into two flat charts, one for the top level and one for the level below, and let the sequence do the nesting.
Example: three variables at Ridgeway
Joe tries parallel sets of channel, plan (Usual or Explorer, which exists only for subscriptions) and coffee group. Most bands need a "not a subscription" category to stay valid, and the result is honest but unreadable. He replaces it with two charts: the mosaic of channel by coffee group, then, for subscriptions alone, Usual against Explorer by coffee group. Two simple charts carry what one tangle could not.
The whole example: one question, four displays, one recommendation
Maya's request was "show me where the money comes from". Here are the four displays Joe tried, judged by "compared with what?".
- The pie of channels. Three parts, one year, "almost half from subscriptions". It works.
- A single stacked bar of channels. It shows the whole as well, but looks lonely on its own, as Wilke notes2. Stacked bars earn their place only as a series, in the quarterly view.
- Sorted bars of coffees. Nine close values, "Other" last, the leaders highlighted. They replace the failed nine slice pie.
- A treemap of channels and coffees. A good overview, poor for comparisons. It goes to the appendix, with numbers in every tile.
The recommendation Joe gives Maya, in the order she sees it:
- A sentence first: "Subscriptions bring in £1.08 million, 45% of revenue, and three coffees bring in 55%." Knaflic's advice applies: when the point is one or two numbers, say the numbers4.
- The pie of the three channels, labelled directly.
- The sorted bars of revenue by coffee.
- The grouped bars of channel revenue by quarter, with the subscription growth of 31.6% in the title, followed by the share view for anyone who asks about the mix.
- The mosaic of top three coffees by channel, with its careful clue about Explorer.
Five pieces, each answering one question, each built for the comparison that question needs.
Which display for which question
| The reader's question | Compared with | First choice | Also good | Avoid |
|---|---|---|---|---|
| How much is each? | the other pieces | sorted bars from zero | horizontal bars for long labels | truncated bars, 3D |
| How much, when all values are large and close? | the other pieces | dot plot, sorted | bars of the differences | bars on a cut axis |
| How much, across two categories? | pieces within a group | grouped bars | small multiples | stacked bars of things that do not add up |
| How much, across a large grid? | patterns | heatmap, ordered rows | table with shaded cells | grouped bars with 20 groups |
| What share is each part of the whole? | the whole | pie with two or three parts | waffle, single stacked bar | pie with many close slices |
| How do the shares compare with each other? | the other pieces | side by side bars on a percentage axis | sorted bars of shares | pie |
| How did the shares change? | itself over time | grouped bars of amounts plus shares | 100% stacked bars with two parts | a row of pies |
| What share sits inside each part? | pieces inside pieces | mosaic plot with numbers | treemap with numbers | double counted pie, sunburst on a slide |
| How do three or more categories combine? | flows between groups | two flat charts in sequence | parallel sets, for exploration | a tangle on a slide |
A decision path you can use on your next chart
The highlighted path is the one Ridgeway's channel split takes. Most other charts in this chapter leave at the first or second question. The pie is one exit among five.
Conclusion: choose the comparison, then the chart
For amounts, bars are the default because people judge length on a common scale best, and they start at zero because the length is the message. Sort them unless the order means something, put "Other" last, switch to dots when every bar would be long, and to a heatmap when there are too many categories.
For shares, start with "compared with what?". Against the whole, with two or three parts and a simple fraction to show, a plain pie is a perfectly good chart, and the research does not support the claim that it is always wrong. Against the other parts, or against itself over time, the pie fails and bars win. When the parts have parts, a mosaic or a treemap with the numbers written in shows the structure, and two flat charts in sequence usually explain it better.
The next chapter turns from totals to spread, with histograms, box plots and density plots, where Ridgeway's skewed order values make the case for showing more than one number. If you want this kind of thinking applied to your own reports, it is a core part of my Data Science work, and the free workshop is the place to start: bring your current "revenue breakdown" slide and we will rebuild it together.
