Ask for a chart the table can't support, and a good tool says no, and says why. It's tempting to treat that as an error to get around. It's more useful to read it as a short report on your table.

What a refusal tells you

A refusal usually names the part of a chart's recipe that's missing. The wording varies from tool to tool, but it comes down to one of a few things, and each one points back to something earlier in this course:

  • "This chart needs a date or an ordered field." The table has nothing to put in time order (module 2: roles). A line through categories would invent a change that never happened (module 4: order).
  • "This chart needs a place the map can find." No field matches a country, a state or coordinates, or the names don't match how the map spells them (module 4: place keys).
  • "This chart needs a measure." Nothing in the table can be added up or averaged (module 2: numbers that are labels). Counting may still work.
  • "There are too many values for this chart." A pie of hundreds of slices, a legend of dozens of colors (module 4: too many parts).
  • "The parts don't add up to a whole." A part-of-a-whole chart over averages or rates, which can't be summed (module 2: adding up).

So a refusal is the tool doing the shape check from module 3 for you, and reporting the result.

Three ways to respond

When a chart is refused, you have three honest options:

  1. Change the question. If there's no date, "how did it change?" can't be answered from this table, but "which is biggest?" can. The tool can usually suggest charts that do fit.
  2. Change the table. Add the missing field at the source: a date, a place code, the parts of a rate. Unpivot a wide table (module 1). Group a field with too many values.
  3. Change the chart. Pick a type from the same family whose recipe the table meets: bars instead of a map, a treemap instead of a pie.

The one thing not to do is force the chart anyway, by typing fake dates, padding names to match a map, or summing a rate. The chart would draw, but it would tell the reader something false.

A worked example

Take a table of city service complaints: complaint type, neighborhood, days to resolve, cost, priority. Ask for "a line chart of complaints by month", and this product's check answers:

A date grain needs a date column, and this data has none.

Notice what it refuses. A line chart on its own is fine here: it could follow days to resolve, which has an order. What the table can't give is the months. No field says when a complaint came in.

Read as advice, the refusal says: this table can't answer a time question. You can check that yourself: the probe below reads the table's shape and lists what it can show.

Loading the interactive...

Two ways forward:

  • Change the question to one the table can answer, such as how long each complaint type takes to resolve:
A violin plot of the "City 311 Service Complaints" dataset: the shape of Sum of Cost's spread for each of 4 Priority groups.
A violin plot of the "City 311 Service Complaints" dataset: the shape of Sum of Cost's spread for each of 4 Priority groups.

How to read this Violin plot Try it in the explorer

  • Change the table: if the source system records when each complaint was opened, export that field too, and the time question becomes possible.

Refusals protect the reader

A tool that draws anything you ask for will sometimes draw something misleading: a line through unordered categories, a map with half its regions missing, a pie that adds up averages. A refusal costs you a minute. A misleading chart can cost a decision.

Try it

Think of a chart that didn't work out for one of your tables. Which part of the recipe was missing: an order, a place, a measure, a manageable number of parts, or parts that add up? Then pick one of the three responses and try it.

The last lesson in this module shows how to ask for a chart so the answer fits the first time.