Stacked Bar Chart
The stacked bar chart shows how a total is divided into parts, across multiple groups. Its primary limitation is that only the bottom segment has a stable baseline (zero) —all other segments float, making direct visual comparison of middle segments unreliable. Licklider adds value labels to each segment and discloses this comparison limitation in the legend.
STEP 1 —When to Use
Use a stacked bar chart when: the primary message is how the composition of a whole changes across groups; you want to show both the total and the parts simultaneously; there are 3— categories (more than 7 makes the stacking unreadable); the bottom category is the one of primary scientific interest (it has a stable baseline).
100% stacked bar: use when comparing proportions across groups where the totals differ —the bars are normalized to 100%, showing only relative composition. This should be clearly labeled as 100% stacked to avoid implying that the totals are equal.
Do not use stacked bars when: comparing the middle or top segments is the primary question (use a grouped bar chart instead); you have a continuous x-axis (use a stacked area chart); more than 7 categories are present.
STEP 2 —Journal Requirement
- Each segment must be labeled with its value or percentage (at least for segments > 5% of the total).
- Color palette must be colorblind-accessible (for 竕、7 categories, a ColorBrewer qualitative palette is required).
- The legend should note: "Direct visual comparison of non-bottom segments is limited; values are labeled."
- Whether the chart is absolute or 100%-normalized must be clearly stated on the y-axis.
- n per group (total observations in each bar) must be stated.
STEP 3 —Licklider Implementation
Input
- Category counts or proportions per group
- Chart type: absolute (raw counts or values) or 100% proportional
- Segment order: largest-at-bottom (default) or user-specified
- Color palette: ColorBrewer qualitative (default), accessible custom palette
Output
- Stacked bars with distinct accessible colors per segment
- Percentage or value labels on each segment (auto-sized, hidden for <5%)
- Y-axis: count / proportion / percentage (labeled appropriately)
- 100% mode: y-axis labeled as "Percentage (%)" with note in legend
- Accessibility check: color palette tested for deuteranopia and protanopia contrast
- Legend note on middle-segment comparison limitation
STEP 4 —Draft Output (Draft / Needs review)
100% stacked bar chart showing the proportional composition of [variable]
across [N groups] (n per group: [values]). Bars are normalized to 100%;
absolute totals differ across groups. Values are labeled on each segment.
Colors are from the ColorBrewer qualitative palette and are distinguishable
under deuteranopia and protanopia color vision deficiency. Note: direct
visual comparison of middle segments is limited due to differing baselines;
percentage values are labeled for reference.