Data categories

How to order and name the categories you compare in a chart, such as months, terminals or trade lanes.

A category is a group you compare along an axis, such as a month or a terminal. This is different from a data series, which is a set of related values shown together, such as the volume for one trade lane.

In a line chart of monthly container volume for three trade lanes, the months are the categories and each trade lane is a series.

Column chart: the categories run along the horizontal axis.
Bar chart: the categories run down the vertical axis.
Line chart: the months are the categories. Each line is a series.
Stacked bar chart: each month is a category, split into three series.

Sort categories in a meaningful order

Put categories in an order that helps people do what they need to do. Don’t leave them in an arbitrary order, such as the order the data happened to arrive.

  • Natural order: use it where one exists, such as time or size bands.
  • Alphabetical: use it when people need to find a specific category, such as in a long list.
  • By value: use it when people need to compare categories or see a ranking. Largest first is the usual default. Sort smallest first when the lowest values are the focus.

The same options apply to the order of series within a stack or group, and to the slices of a donut or pie chart, ordered clockwise from the top. Choose one order and keep the same sequence across related charts, so people can compare them. Keep “Other” last by default (see Data series).

Choose the order that suits what people need to do.

Name categories clearly

Name categories the way your audience says them, not as they appear in the data source or code. Use the same wording and capitalisation for every category, and keep the same names across related charts so people recognise a category wherever it appears.

For how to show long names on an axis, see Categories under Labels and legends. For axis titles and units, see Axes and grid.

See also