Stacked bar graphs display a part-to-whole relationship (i.e. the relative composition of a total measure by all parts of that measure) across several groups or time points as horizontal or vertical bars – for example, the total primary energy supply attributable to each energy source across several countries. In this example, the whole bar is total primary energy supply, and the parts or segments of that bar represent the various energy sources.
Using stacked bar graphs
Bars should include all parts of the total measure so that readers are fully informed about which parts contribute most and least. Accordingly, the parts or segments of each bar should add to 100% if data are presented as percentages, or the total absolute value of the measure (e.g. total greenhouse gas emissions).
There are 2 exceptions to using stacked bar graphs for part-to-whole relationships:
- displaying this kind of data for only 1 group or population – we recommend using horizontal bar graphs for these data
- displaying data that describe a part-to-whole relationship for more than about 8 time points – consider whether a stacked area graph would better convey your data message.
The direction of stacked bar graphs can be differentiated in the same way as for regular bar graphs – horizontal bars are best used for comparing discrete categories or groups (e.g. categories of primary industry), and vertical bars are best for comparing data values across a relatively small number of time points (about 8 or less).
Horizontal stacked bar graphs
Visualising part-to-whole relationships for discrete groups
Data that represent part-to-whole relationships for more than 1 discrete group should be shown as horizontal stacked bar graphs. This enables easy side-by-side comparison of the same parts across bars. The use of horizontal, rather than vertical, bars for discrete groups is consistent with the differentiation between simple horizontal and vertical bar graphs:
Vertical stacked bar graphs
Visualising part-to-whole relationships for time-series data
As for simple bar graphs, vertical bars should be used when data for the same measure (that has several parts) are collected repeatedly over time.
As discussed for horizontal stacked bar graphs, the vertical form of this graph enables readers to easily make side-by-side comparisons of the same parts across bars (which are time intervals, in this case). This successfully conveys the key message for this kind of data – that is, differences in the relative size of segments or parts over time:
Bars crossing the measurement axis at 0
Bars should always start at zero on the measurement axis – that is, the axis that displays the data values (rather than the axis that shows labels for the bars). This recommendation does not always apply to line graphs.
Ordered or ranked bars for discrete groups
Readers are able to judge differences in magnitude more easily when data are ordered by size. Values in a horizontal bar graph can be ordered (top to bottom) from largest to smallest, to emphasise the largest values. The opposite can be done to emphasise the smallest value.
Spacing of parts within stacked bars
Within each bar, parts (or portions) should be shown flush against each other (i.e. without spaces within each bar). This communicates to the reader that the segments of each bar relate to a single high-order concept or measure.