This article describes how to create a stacked column chart from an existing table like this:
To a chart like this (a 100% stacked column chart):
The same process can be used to create a column chart where the total does not add up to 100%. For example, the chart below was created using the same data as above, but replacing the percentages with the count for each cell:
Requirements
At least one of the following:
- A table with at least two columns and at least one row.
- Two variables.
Method 1 - via the visualization menu
- Select Visualization
> Column > Stacked Column from the toolbar.
- Click on the page to place the visualization.
- Under Data > Data Source > Data, select the table that you want to base the chart on. Alternatively, select a variable from Variables for the data you want to base the columns on. Note that using variables as inputs comes with some caveats.
- OPTIONAL: If using Variables in Step 4, select your second variable in Data > Data Source > Group, for the variable that you'd like to stack the column on.
- OPTIONAL: If using variables as input, go to Data > Data Manipulation and tick Convert to percentages/proportions if you want to show %s rather than counts.
- OPTIONAL: Under Chart, make other adjustments to change the appearance of the visualization.
- Click Calculate and/or ensure that Calculate automatically is checked.
Method 2 - using an existing table
- Select the table.
- Go to Properties
, then select Visualization > Column > Stacked Column.
- OPTIONAL: Under Chart, make other adjustments to change the appearance of the visualization.
- Click Calculate and/or ensure that Calculate automatically is checked.
Options
The following is an explanation of the options available in the Properties for this specific visualization. Refer to Visualization Options for general chart formatting options.
Chart
Appearance
- Gap between bars - Specify the amount of space between bars/columns as a proportion of the available space. Values can range from 0 (no gaps) to 0.99 (bars are shown as lines).
- Bar corner radius (% of width) - controls the degree of rounded corners on bar and column charts.
Data Labels
- Minimum threshold to show data labels - Data labels will be hidden in Stacked charts for values that are smaller than this proportion of the total range across all categories in the data. For example, if the longest bar in the chart adds up to 40% and the threshold is set to .3 (or 30%), data values less than 12% (40% * .3) will not be labeled in the chart.
Note
Important information about editing captions:
Caption edits for visualization captions may not be retained when a visualization with a nested table is switched back to a table. Normally, this only occurs when you double-click the caption and edit the text directly. As a workaround, we recommend using Appearance > Caption > Edit caption to edit your captions.
Next
How to Create a Clustered Column Chart
How to Create a Stacked Column Chart
How to Create Several Column Charts Using Small Multiples
How to Add a Line to a Column Chart (Second Y-Axis)
How to Customize the Color of a Single Category in a Bar, Column, or Funnel Visualization
How to Apply a Gradient Palette to a Bar, Column, or Funnel Visualization
UPCOMING WEBINAR: Run Research Your Way With AI Skills