Skip To Content

Create and use a stacked column chart

Stacked column charts display the relative size—either as a count, percentage, or other numeric variable—of a categorical variable, subdivided by color based on a subgroup.

Stacked column charts can answer questions about your data, such as How are numeric values distributed or summarized by category and subcategory? How is your data ranked?

Example

An insurance company is reviewing the types of policies it offers to compare its current offerings to the findings from a recently completed market research project. The insurance company is especially interested in expanding its business in five cities of interest. A stacked column chart can be used to visualize the sum of total insured values (TIV) for each city of interest and policy class.

Stacked column chart of city and TIV, subgrouped by policy class

The analyst is interested to see that Miami has the highest TIV, despite having approximately half the population of Jacksonville. Based on these values, it seems like Jacksonville could be a good choice for expanding business. The analyst will also look closer at advertising and competition in Miami so she can create a strategy for the other cities.

The company believes it may be able to break into new markets by advertising bundle options to existing customers. The marketing team thinks it would be best to customize which bundles are promoted for each city based on which policy classes are being under-purchased. The analyst can determine which bundles to promote in each city by changing the numeric variable on the stacked column chart from the sum of TIV to the count of policies and displaying the chart with a stacked percent. The changes to the chart allow the analyst to determine the proportions of policies sold from each class for the cities of interest.

Stacked column chart of city and TIV, subgrouped by policy class and displayed as a stacked percent

The chart shows that most of the cities have at least one policy class with a very low percentage of the overall count of policies for the city. For example, Jacksonville and Saint Petersburg have no policies in the Automobile and Property classes, respectively. The company could try to increase the sales of those policy classes by advertising insurance bundles to existing life insurance customers, which make up a relatively high proportion of the policies in both Jacksonville and Saint Petersburg.

Create a stacked column chart

To create a stacked column chart, complete the following steps:

  1. Select one of the following data options:
    • Two string fields String field
    • Two string fields String field plus a number Number field or rate/ratio field Rate/ratio field
    Note:

    If you do not select a number or rate/ratio field, your data will be aggregated and a count will be displayed.

  2. Create the stacked column chart.
    1. Drag the selected fields to a new card.
    2. Hover over the Chart drop zone.
    3. Drop the selected fields on Stacked Column Chart.
Tip:

You can also create charts using the Chart menu above the data pane or the Visualization type button Visualization type on an existing card. For the Chart menu, only charts that are compatible with your data selection will be enabled. For the Visualization type menu, only compatible visualizations (including maps, charts, or tables) will be displayed.

Usage notes

The Legend button Legend can be used to select data from the subgroup. To change the color associated with a category, click the symbol and choose a color from the palette, or enter a hex value.

The Style tab Style can be used to change the layout between Stacked Count and Stacked Percent. The Stacked Count layout displays the numerical variable on the chart as totals for both the category and subcategory, with the height of the column and segments inside the column representing the amount of the numerical variable. The Stacked Percent layout displays all categories as the same size, representing a range from 0 to 100%. The subcategories are all displayed as proportions of the columns. The Style tab can also be used to change the outline color.

The value of each column can be symbolized as a count of features in each category on the y-axis, or as a number or rate/ratio field. If a field is used, the column values can be calculated as a sum, minimum, maximum, average, percentile, or median of values from the field for each category.

Note:

Median and percentile are not available for remote feature layers.

The subgroup can be removed to change the stacked column chart to a column chart.

Use the Chart statistics button Chart statistics to display the mean, median, upper quartile, lower quartile, or a custom value.

Use the Sort button Sort to sort the categorical data in either ascending or descending order by the numeric variable or alphabetically.

Use the Visualization type button Visualization type to switch directly between a stacked column chart and other visualizations, such as a summary table, treemap, or line graph.

When you create a stacked column chart, the result dataset Results with the string and number fields used to create the chart is added to the data pane. The result dataset can be used to find answers with nonspatial analysis using the Action button Action.