What Is a Legend in a Chart?
TERMThe 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.
What a legend shows
Every legend entry has two parts:
- The key (symbol or swatch) — a miniature copy of the mark used in the chart: a coloured square for a bar or pie slice, a short line segment for a line series, a dot or triangle for scatter points. It copies colour and style, so a dashed line in the chart appears dashed in the legend.
- The label — the name of the data series or category, such as "Blog", "2024", "Men" or "Product A".
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 type | What the legend identifies | Example entries |
|---|---|---|
| Line chart | Each line (series) | Revenue, Costs, Profit |
| Pie or donut chart | Each slice (category) | Rent, Food, Transport, Other |
| Stacked bar chart | Each coloured segment inside a bar | Q1, Q2, Q3, Q4 |
| Grouped bar chart | Each bar within a group | 2023, 2024 |
| Scatter plot | Point colour or shape, sometimes point size | Species A, Species B |
| Heatmap or map | A colour scale (gradient bar) from low to high | 0 → 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
- 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.
- 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.
- Check the order. In stacked charts the legend order often mirrors the stacking order, which helps you find thin segments.
- Look for extra encodings. If marks vary in size or shade, there may be a second legend explaining what size or intensity means.
- 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.
- Single series: one line or one set of same-coloured bars needs no legend — the title and axis titles already say what is plotted. A lone legend entry just wastes space.
- Two to four series: direct labels (the name written at the end of each line or inside each segment) are often clearer, because the reader does not have to look back and forth.
- Many series, or crowded marks: a legend is the practical choice when direct labels would overlap.
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
- Colours that are too similar. Five shades of blue make the legend impossible to match. Use clearly distinct hues — see how to choose chart colours.
- Relying on colour alone. Roughly one in twelve men has some form of colour-vision deficiency, so red/green pairs can be indistinguishable. Add dash patterns, marker shapes or direct labels (colour accessibility guide).
- Legend order that fights the chart. If the top line is listed last, readers mismatch entries. Order entries to match the visual order.
- Default names. "Series 1" and "Series 2" tell the reader nothing; rename them to what they measure.
- Too many entries. More than about six or seven colours become hard to tell apart; group small categories into "Other" or split the chart into small multiples.
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.