What Is a Legend in a Chart?

TERM

The key that tells you what each colour, line or symbol means.

A legend in a chart is the key that explains what each colour, line style, pattern or symbol represents. Each entry pairs a small sample of the mark (a coloured square, a line, a dot) with a text label naming the data series or category it stands for, so you can tell which line, bar or slice is which.

In short, the legend meaning in a graph is "what the colours mean". The moment a chart shows more than one thing — two lines, a stack of coloured segments, several kinds of points — the reader needs a way to match marks to names. The legend supplies that mapping, turning an ambiguous picture into something self-explanatory.

Line chart with three coloured lines and a legend naming each line JanFebMarAprMay Legend Blog Docs Pricing
The legend (dashed box) maps each line's colour and style to a name. Without it, the three lines are just three anonymous squiggles.

What a legend shows

Every legend entry has two parts:

A legend does not show the chart title, the values themselves (that is the job of data labels) or the gridlines. It answers one question only: which mark belongs to which group? That is why, in quiz form, the correct answer to "what does the legend in a chart do?" is that it explains the colours or symbols used.

Legend examples by chart type

Chart typeWhat the legend identifiesExample entries
Line chartEach line (series)Revenue, Costs, Profit
Pie or donut chartEach slice (category)Rent, Food, Transport, Other
Stacked bar chartEach coloured segment inside a barQ1, Q2, Q3, Q4
Grouped bar chartEach bar within a group2023, 2024
Scatter plotPoint colour or shape, sometimes point sizeSpecies A, Species B
Heatmap or mapA colour scale (gradient bar) from low to high0 → 100

Note the last row: a legend is not always a list of names. On a heatmap or choropleth map it is a colour scale showing which shade corresponds to which number.

How to read a chart legend

  1. Find it. Legends usually sit at the top, to the right of the plot, or below it. Some charts skip the box and write labels directly next to each line.
  2. Match each swatch to a mark. Check colour and style together: two lines can share a colour but differ in dash pattern or marker shape.
  3. Check the order. In stacked charts the legend order often mirrors the stacking order, which helps you find thin segments.
  4. Look for extra encodings. If marks vary in size or shade, there may be a second legend explaining what size or intensity means.
  5. Then read the data. Only once you know which series is which should you compare values against the axes.

For the full reading routine, see how to read a chart.

Is a legend needed on every chart?

No. A legend is only needed when a chart encodes more than one group with colour, shape or pattern.

Quick rule

If a reader could ask "which one is which?", the chart needs either a legend or direct labels. If they couldn't, delete the legend.

Common legend mistakes

Legend vs. key vs. data label

"Legend" and "key" mean the same thing — maps tend to say key, charts tend to say legend. A data label is different: it prints the actual value (for example "42%") on a bar or slice. On a pie chart you might use both: the legend names each slice, the data labels give its share. The legend is also distinct from the axis title, which names what an axis measures.

Want to see legends in action? Build a multi-series chart in the line chart maker and the legend is generated from your column names.

Frequently asked questions

What is a legend in a graph?

A legend is the key on a graph that explains what each colour, line style or symbol represents. Each entry pairs a small sample of the mark with a label naming the data series or category, so you can tell which line, bar or slice is which.

What does the legend in a chart help you identify?

It helps you identify the data series or categories behind each colour or symbol. It does not show the chart title, the exact values or the gridlines; it only explains what the colours or symbols used in the chart mean.

Is a legend needed on every chart?

No. A chart with a single series needs no legend because there is nothing to tell apart. With two to four series, labelling each line or segment directly is often clearer. Use a legend when there are many series or direct labels would overlap.

Is a legend the same as a key?

Yes. Legend and key are two names for the same thing. Maps usually call it a key and charts usually call it a legend, but both explain what the symbols or colours represent.

How do you use a legend in a graph?

Find the legend, match each colour or line style in it to the same mark in the plot, and only then read values against the axes. For example, if the legend says green means Blog, the green line shows the Blog figures.

Where should a legend go on a chart?

Place it where the eye meets it before the data, usually above the plot or to its right, and order the entries to match the order of the series in the chart. If space allows, labelling the lines directly removes the need for a separate legend.