Legend

Legends identify the meaning of various elements in a data visualization and can be used as an alternative to labeling data directly. They are commonly used when there is more than one color. They always include a color marker with a corresponding label.

Usage guidelines

These legend guidelines apply to the majority of data visualizations (except for the alluvial diagram and sparkline chart). For typography details on legends, see our page on typography.

Always display numeric values in descending order (highest to lowest).
Use clear language and avoid acronyms in legends.
Put the legend in the top right corner of a chart (this is the default placement).
Don’t use a legend if there is only one color that represents one category.

Spacing

Follow specific guidelines for legend spacing, as illustrated below:

Spacing

Positioning

Legends are placed in the top right corner of charts by default, and are always right-aligned. Depending on a page’s layout and the length of your legend, you may choose to put the legend in the bottom left corner, especially when there is little space.

Positioning (top right)

Position the legend at the top right of the chart.

Positioning (bottom left)

Position the legend at the bottom left of the chart when space at the top is scarce.

Order

Whenever possible, legends should be organized in the same order as the corresponding items appear in the chart. This helps end users interpret the data faster.

Ordering do

The order of the legend repeats the order of the categories in the chart.

Ordering don't

Mixing the order makes it more difficult to read the chart.