# When is it incorrect to draw stacked area charts?

Stacked area charts work great when charting raw values, averages, counts, and percentage of total. The sum of the values across the different groups will add up to that of the entire set.

But what about in the case when the value being charted is a Median, Geo Mean, or any Percentile? In these cases the sum of the values (say Media) across the categories will not add up to the Median value of the entire set.

Example: We have the data on the consumption of Meat, Vegetables, Fruits, and Dairy for a country. For each category (and the entire set) we have the median pounds consumed per person, each year, for the last 10 years. If we were to draw them in a stacked area chart, the sum of the values for a given year would not equal the median pounds consumed per person across all the categories.

Is it fair to assume that the stacked charts should be avoided in these cases as they will cause confusion?

-
I would agree with you on that. – Michael Chernick Jun 1 '12 at 2:43
with regard to your first sentence, how would a stacked area chart work with an average? The essence of a stacked area chart is that you can add the values together and I don't see how that would apply to most series of averages. – Peter Ellis Jun 1 '12 at 5:56
To the issue of stacked charts (as opposed to the measure your charting), they tend to work well for showing totals, so if that's your focus and the relative size of the components is secondary they'll be ok. However, if you want to compare the components beware that the shifting of the base of each component (as it's the top of the previous component) makes them hard to compare directly. You could consider panel/small multiples to accomplish the same thing with more clarity. – dav Jun 1 '12 at 13:48
What is the question you are trying to illustrate using this chart? – Dimitriy V. Masterov Jun 5 '12 at 13:10

The simplest rule is that it is incorrect to use a stacked area chart on any day of the week ending in a 'y' (may need modification if used outside of English speaking locales).

If you are interested in the total, then plot the total and don't include the chartjunk formed by the other groups.

In a stacked area chart you may be able to interpret the total and you may be able to interpret the line that is on the bottom, but it is very difficult to interpret the other lines, you need to judge the difference between the line and the one below it which is much harder than than just looking at individual lines. If you are interested in the individual lines then plot them against a common scale, not distorted by stacking. If you don't care about the individual lines then they are distorting and distracting chartjunk.

-