Some chart failures have nothing to do with the numbers. The chart simply has more parts than a reader can take in. Module 3 showed how to count a field's different values; this lesson shows what that count does to a chart.

Where the limit bites

Each kind of part has its own limit:

  • Slices. A pie reads well with a handful of slices. Past that, the small ones become slivers too thin to label, and close ones can't be ranked.
  • Colors. A reader can match a color to its legend for only a small set of colors. Past a dozen or so, the legend becomes a lookup table, and the reader stops using it.
  • Lines. A few lines on one chart can cross and still be followed. Many lines turn into a tangle where no single one can be traced.
  • Labels. Bars with long names, or many of them, crowd until the labels overlap or have to be tilted.

None of these limits is a hard number. They depend on the tile's size, the reader and how different the values are. But they all move the same way: more parts, harder chart.

Four ways out

When a field has too many values for the chart you had in mind:

  1. Choose a form built for many parts. A sorted bar chart or a table handles hundreds of rows. A treemap nests many parts in one rectangle. Small multiples give each part its own panel.
  2. Keep the top few. Show the largest parts and group the rest as "Other". A Pareto chart does this by design: it ranks the parts and shows how few of them make up most of the total.
  3. Group the values. Roll cities up to regions, days up to months, products up to categories.
  4. Highlight one or two. Draw every line in gray and color only the ones the reader needs.

A worked example

Take a table of orders from 205 stores. A pie of revenue by store would have that many slices: most would be slivers, and no label could fit.

You can watch the product draw that line. A pie fits the company headcount table's 12 departments. Split them into more slices and see what it says then:

Loading the interactive...

A treemap fits them all. Every store is a block sized by its revenue, and the biggest stores stand out at once, even though the smallest blocks are too small to read:

A treemap of the "Order Value by Store, Raw Order Rows" dataset: one rectangle per store_number, sized by its order_value, 205 in all.
A treemap of the "Order Value by Store, Raw Order Rows" dataset: one rectangle per store_number, sized by its order_value, 205 in all.

How to read this Treemap Try it in the explorer

A Pareto chart answers a sharper question: how many stores make up most of the revenue? It ranks the stores as bars and adds a line for the running share of the total:

A Pareto chart of the "Order Value by Store, Raw Order Rows" dataset: store_number sorted by order_value, with a line of the running share.
A Pareto chart of the "Order Value by Store, Raw Order Rows" dataset: store_number sorted by order_value, with a line of the running share.

How to read this Pareto chart Try it in the explorer

Both are honest about the number of stores. Neither tries to give each one a color.

When a table wins

If the reader needs to look up one particular store's figure, no chart beats a sorted table with a search box. Charts are for patterns: the biggest, the smallest, the shape of the spread. When the question is "what was store 101YM3248's total?", give the reader a table.

Try it

Pick a field you'd like to chart by and count its different values. Then name the part it would become: slices, colors, lines, bars or panels. If the count is high for that part, pick one of the four ways out before you build the chart, not after it looks wrong.

The next lesson looks at a different kind of failure: a chart that implies an order the data doesn't have.