Data categories
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.
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).
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.