New Tool Radar

AI Design Workflows

How to Check Whether a Chart Needs a Legend or Direct Labels

Check whether a chart needs a legend or direct labels, because a legend that forces the eye back and forth slows every reader down.

Schematic with three steps: count the series, try direct labels, keep the legend only if it wins.

A legend makes the reader look away from the line, find the colour in a box, and look back: three trips for one fact. Direct labels put the name beside the line, so the fact is read in one look. This check tests whether the chart should drop its legend for direct labels.

Why this needs its own check

WebAIM’s contrast guide states that WCAG 1.4.11 Non-text Contrast requires the parts of a graphic required to understand the content to contrast at least 3 to 1 against adjacent colours. Direct labels help here too: a label beside a line identifies it without relying on colour alone, which is also the rule for colour used as the only way to tell things apart.

What you need before you start

  • The chart as it will be published
  • A count of the data series in the chart
  • A version of the chart with direct labels to compare

Step 1 – Count the series

Count the lines or bars in the chart. Two or three series usually take direct labels well; six or more may need a legend, since labels start to collide.

Step 2 – Try direct labels

Put the name of each series beside its line or bar, in the same colour as the series, and read the chart. If the labels fit without overlapping and the chart reads faster, direct labels win.

Step 3 – Keep the legend only if it wins

If direct labels collide or crowd the chart, keep the legend, but order it to match the chart: the top legend entry matches the top line. A legend in a different order than the chart fails.

Worked example

Practice check: a fictional Foxglove Pharmacy prescription chart

The example below is fictional. Foxglove Pharmacy is an invented business used only as a practice case. No real customer, page, or product is shown. Treat it as a practice case, not as evidence about any real business.

Part What it should be As shown Result
Series counted Count recorded Three series Pass
Direct labels tried Labels fit without overlap Labels fit without overlap Pass
Chart reads faster Answer found in one look Answer found in one look Pass
Legend removed Legend removed where labels win Legend still shown as well Fail – legend duplicates the labels

Only 3 of the 4 checks pass: the series count, the direct labels, and the faster reading. The one failure is the legend, still shown beside labels that already do its job.

What to do when something is wrong

Remove the legend now that direct labels carry the names, and use the freed space for a clearer title. Keep the legend only on charts where direct labels genuinely do not fit.

Expected result. We checked the WebAIM contrast guide listed in Sources. We did not test a live Foxglove Pharmacy chart. UNTESTED: no chart was read by a real reader; the practice table shows the expected result pattern for a chart carrying both labels and a legend.

Limits

  • This check covers legends against direct labels only. It does not cover chart type choice, axis labels, or colour scales, which have their own checks.

Sources

See all