I hate stacked area charts

I keep seeing stacked area charts in my travels around the ’net. Horace Dediu at Asymco, for example, seems particularly fond of them.1 It’s easy to see why. They have big blocks of color to attract the eye, and they don’t look as stodgy as their sibling, the stacked column chart. But I find them often misleading, even when their creator doesn’t intend them to be.

Here’s a fictitious example to show what I’m talking about. It’s a timeline of the change in market share, in percent, of three companies that are the only manufacturers of a particular device. We’ll call the companies Orange, Green, and Blue and use those colors in our charts. Let’s look at this chart.

One way to show market share

Obviously, Orange started out dominating the market, but Blue expanded rapidly and took over. But here’s the harder question: How did Green do over this period?

To the unwary, it looks like Green lost a bit of market share. Not nearly as much as Orange, of course, but the green swath certainly gets thinner as we move to the right end of the chart.

Here’s the data on which the chart is based.

Company Q1Y1 Q2Y1 Q3Y1 Q4Y1 Q1Y2 Q2Y2
Blue 10 11 15 25 45 80
Green 15 16 17 18 19 20
Orange 75 73 68 57 36 0

Oh, dear. Green’s market share has been increasing, not decreasing.

The discrepancy arises because the chart plots the market share vertically, but we perceive the thickness of a stream at right angles to its general direction.

Plot vs perception

Obviously, a chart in which the market shares stayed relatively stable wouldn’t have this perception problem, but it wouldn’t be interesting enough to make a chart of, either.

There is a way to make the perception of Green’s market share match up with the data: put it at the top or bottom of the chart.

Replotting market share

Rearranging works pretty well in this case, because we have only three companies, and Green’s slope is gentle enough that it doesn’t distort our view of Blue. If, however, we had more companies to track, it’s a good bet that at least one of them would look worse than it is because of the tilted baseline problem.

The solution to this problem is to avoid the sexy stacked area chart and use the duller stacked column chart. No cool jagged boundaries in this chart, but it does give a true picture of all three companies regardless of how they’re ordered because it keeps your eye focused on the vertical.

Stacked column chart

  1. Didn’t I once say I was tired of reading about the finances of Apple and its peers? Yes, I did. So why am I reading Asymco, which is all about finances? Well, I read people who link to Asymco, so it’s hard to avoid. And it’s not like I’m averse to a taste of financial blogging; I just don’t want it as a steady diet. 

8 Responses to “I hate stacked area charts”

  1. Allen B. MacKenzie says:

    We have a similar problem with bit error rate (vs. SINR) curves in my field. Examples in this Wikipedia article. What’s important is horizontal distance between curves, but that’s not what you see. http://en.wikipedia.org/wiki/Bit_error_rate

  2. Dr. Drang says:

    I’ve seen it in line charts comparing experimental results with a mathematical model (usually a finite element model). In sharply rising portions of the graph, the model can look very close to the test results even though the vertical separation (the real measure of error) between the two is large.

    So the perception problem isn’t confined to stacked area charts, but it does seem to show up there more often than in other chart types.

  3. psj says:

    I think you should clarify the critique a little: You’re taking offense with the display of discrete measurements in a line graph - that’s the first valid point. Secondly, it should be added that stacked percentage charts tend to be harder to interpret as well. (If you’re interested in the problems with relative numbers when compared to absolute numbers, see the research by Gerd Gigerenzer.)

    Now, stacked area plots can actually work very well. That is, when they represent finely grained or even continuous measurements and represent absolute numbers. As a good example of one (admittedly specialized) type of stacked area plot, I recommend the so-called stream graphs: http://www.leebyron.com/else/streamgraph/


  4. Bill says:

    Like a photographer using aperture to change the focus of a scene to tell a story, Horace uses the stacked area chart to tell his story. In your example, does it really matter what green is doing? The real story is Yellow lost at Blue’s expense.

  5. Dr. Drang says:

    No, psj, I’m definitely not offended by the display of discrete measurements in a line chart—I make charts like that all the time. (By the way, aren’t all measurements discrete? Even if the information is coming from a data logger that’s running at 100 Hz, it’s still discrete.)

    And absolute measurements aren’t immune to the tilted baseline problem. The paper you linked to recognizes that. I haven’t had a chance to dig into it yet, but it looks interesting.

  6. Dr. Drang says:

    In my view, Bill, if you put Green in your chart, it’s part of the story, and its part should be told well. In this story, that a small player in the market isn’t being squeezed out by Blue—and is, in fact, gaining—is likely to be significant. Certainly, that’s often the case in Horace’s posts on the cell phone market.

  7. Jon Peltier says:

    My preference, despite the pieces adding to 100%, is an installed line chart. All data has the same baseline, so the lines are easy to compare, and thee are fewer sources of distortion.

  8. Des Traynor says:

    Great point about angle vs vertical height.

    I did a presentation on data visualisation talking about this and other issues Y’all might enjoy it. http://blog.intercom.io/data-visualisation-in-web-apps/