Stacked Bar Chart


Stacked Bar Chart Stacked Bar Chart
Table of Contents

The stacked bar chart (also known as a stacked bar graph) expands the regular bar chart by looking at numeric values over two category variables instead of just one. In a conventional bar chart, each bar is broken into a number of sub-bars that are stacked end to end, each one corresponding to a level of the second category variable.

What Is A Stacked Bar Chart?

Stacked bar graphs depict the quantitative relationship between a primary category and its subcategories. Each bar represents a primary category and is broken into segments that reflect subcategories of a secondary categorical variable. The figure depicts not only the quantitative link between the many subcategories, but also with the primary category as a whole. They are also used to demonstrate how the subcategory composition varies over time.

These kinds of charts allow us to depict more intricate relationships than simple bar graphs. Stacked bar graphs should be utilized for comparisons and proportions, with a focus on composition. This composition analysis might be static – at a certain point in time – or dynamic – for a set period of time.

Composition analysis is concerned with a whole that may be broken into separate pieces and how each portion is connected to the overall quantity (in a relative or absolute sense). It is sometimes referred to as a component of a larger analysis.

Stacked bar charts are two-dimensional and have two axes: one for categories and the other for numerical values. The axis indicating the categories lacks a scale to emphasize that it pertains to distinct (mutually exclusive) groupings. A scale with the correct measuring units must be present on the axis containing numerical values.

Scales are markers on a chart that illustrate the range of values for the data shown in the visualization. They are often shown as intervals with the associated measurement units.

Stacked bar chart are represented by rectangular bars that, like regular bar charts, can be orientated horizontally or vertically. Each major category is subdivided into segments that reflect subcategories of a second categorical variable. The length or height of rectangular segments stacked end to end horizontally or vertically shows the number of each subcategory. The overall amount of each primary category is represented by the ultimate height or length of each bar (except in percent stacked bar charts).

To avoid confusing the viewers, equivalent subcategories must have the same color in each bar. To clearly demonstrate that the major bars correspond to separate groupings, some space is normally allowed between them.


The stacked bar chart above displays income from a fictitious fitness business during a certain time period, broken down into two categories variables: store location and department. The key category variable is store location: the sorted overall bar heights show that the Cherry St. location has the most revenue and the Apple Rd. location has the lowest. Each bar is split into levels based on the second category variable, department. We can observe that for the majority of places, apparel outsells equipment, which outsells accessories. The Strawberry Mall location appears to have a smaller proportion of income attributable to equipment, whereas Peach St. appears to have a higher proportion of revenue allocated to equipment.

Exploratory Research Guide

Conducting exploratory research seems tricky but an effective guide can help.

How To Read A Stacked Bar Chart

Recognise The Data Points You Wish To Compare

First, be certain that you thoroughly comprehend the values you’re reading and what they represent. For example, you may be looking at a chart that shows which countries your company’s clients live in.

Examine The Pattern 

Examine the general trend within the chart to have a better understanding of the data. For example, you may see that sales to consumers in the United States have gradually increased over the last three years. You may also note that sales tend to fall at particular times of the year.

Look For Any Outliners 

Look at the bottom of the chart to see how the grid lines may be used to compare the different data points. This will assist you in determining the relevance of each result and identifying any outliers.

Best Practices To Use A Stacked Bar Chart

Stacked bar charts, by definition, imply using the same best practices as the conventional bar charts from which they are constructed. The inclusion of a second category variable, on the other hand, introduces new concerns for generating an effective stacked bar chart.

Maintain A Zero-baseline

When a negative number is encountered in a typical bar chart, the corresponding bar is simply displayed below or to the left of the baseline (depending on if the bars are vertically or horizontally oriented, respectively). A comparable depiction may be made in a stacked bar chart by stacking bars in the other way.

When positive and negative bars are merged, the overall length of the bar no longer matches to the entire value of the bar. When this happens, it’s a good idea to put another line or series of points on top of the bars to represent the correct total: the difference in the lengths of the positive and negative bars.

When the secondary values for each subgroup are consistently positive or negative, it is simple to maintain a constant ordering of sub-bars inside each primary bar. However, if numerous subgroups move from positive to negative at various periods, a pleasant ordering is impossible since bars alternate between being above and below the baseline. In such circumstances, it may be preferable to explore using an alternative chart type for the data. A line chart or grouped bar chart can give a more uniform representation of specific groupings, but they do not allow you to view the major totals. If viewing a total is absolutely necessary, it may always be displayed in a separate plot – don’t feel obligated to show everything in a single plot.

Ordering Of Category Level

When using a stacked bar chart, you must consider the sequence of category levels in order for both categorical variables to be drawn. In both variables, the typical bar chart rule of thumb applies: order the bars from greatest to smallest unless there is an inherent order of levels.

To understand this criterion for the secondary categorical variable, the overall size of each category level should be considered. It’s a good idea to stack each major bar in the exact same sequence. Keeping this uniformity makes it easy to link sub-bars to secondary category levels. Because of this uniformity, the group that is plotted initially always rests on the baseline, making their sizes simple to read. If tracking accurate values for a certain secondary variable level is critical, then its sub-bars should be put on the baseline instead.

See Voxco survey software in action with a Free demo.

Choosing Effective Colors

While it is generally recommended to utilize a single color in a basic bar chart, the use of color to differentiate secondary variable levels is unavoidable in a stacked bar chart. The key issue is to ensure that the color palette assigned to each category level corresponds to the variable type: a qualitative palette for simply categorical variables, and a sequential or divergent palette for variables with a meaningful order.

Types Of Stacked Bar Chart

Simple Stacked Bar Chart

The absolute value of each subcategory is placed after or above the previous one in Simple Stacked Bars. The numerical axis has a numerical value scale. The graph displays the absolute value of each subcategory, and the sum of these values is the category total. Typically, the main bars have varying final heights or lengths.

Horizontal Bar Chart

A stacked bar chart, like a regular bar chart, can have its bars positioned horizontally (with key categories on the vertical axis) or vertically (with primary categories on the horizontal axis). The horizontal position has the same benefits as the vertical configuration, enabling for the simple presentation of long category levels without rotation or truncation.

Percentage Stacked Bar Chart

The percentage, or relative frequency, stacked bar chart is another popular alternative for stacked bar charts. Each major bar is scaled to the same height in this case, such that each sub-bar represents a percentage contribution to the total at each primary category level. This eliminates our ability to compare the totals of the major category levels, but it does allow us to undertake a more thorough investigation of the relative distributions of the secondary groupings. Fixing the heights of each main bar generates another baseline at the top of the chart where a second subgroup may be monitored across primary bars.

Value Annotations

One solution for comparing sub-bar sizes from lengths is to add comments to each bar indicating its size. This, however, adds a bit additional visual clutter, so use with caution. Check that the stacked bar chart aligns with your major aims for the visualization, or select an alternative chart style.

Advantages Of Stacked Bar Chart

The comparison is simpler to observe on a stacked bar chart than on a combined chart. When data points are stacked on top of each other, the percentage of each data point may be compared to the overall value.

  • Outliers tend to stand out more when reading historical data on a stacked bar chart. For example, if you want to know what your best-selling items were over the last ten years, you can quickly determine which groupings are the most numerous without even reading the text. You may have noticed that your light sales have increased in recent years, but your chair sales have fallen. If you wish to explain increased sales, this sort of report might provide you with visual evidence.
  • Stacked bar charts may also save time by allowing you to easily comprehend data. A stacked bar chart, for example, might simply display the findings of a poll.

Disadvantages Of Stacked Bar Chart

  • Stacked bar charts are used widely but difficult to read.
  • The audience may become confused if the stacking has more than four or five layers.
  • They are also difficult to read when there are too many bars or more than three subcategories over extremely long periods of time. In these circumstances, stacked area maps or stacked densities charts are preferred.

Net Promoter®, NPS®, NPS Prism®, and the NPS-related emoticons are registered trademarks of Bain & Company, Inc., Satmetrix Systems, Inc., and Fred Reichheld. Net Promoter Score℠ and Net Promoter System℠ are service marks of Bain & Company, Inc., Satmetrix Systems, Inc., and Fred Reichheld.

Read more