The stacked bar chart comes in both vertical and horizontal visualizations. On BStreams with the stacked columns chart, we refer to the vertical visualization, while with the term stacked bars to the horizontal. By the way, they both allow you to compare the totals, but they also display the sub-component within each category.
It’s a kind of data visualization that combines bars or columns of various groups on top of each other, and the total length of the resulting rectangles corresponds to the combined result.
To sum up, instead of placing rectangles side by side, an alternative is to stack them to illustrate how the larger category is divided into smaller categories and their relations to the total amounts.
When to use a stacked bar chart
The purpose of the standard bar chart is to compare various values or categories in terms of rectangles lengths. For sure, with the stacked chart, we still can achieve this goal, but it realizes comparison of simultaneous metrics. Moreover, when the relative decomposition of each primary bar is based on a second level categorical variable, it’s an important aspect:
In the stacked chart, every rectangle is composed of various sub-rectangles depending on the number of metrics you add. Thus, the total length of each rectangle allows us to visualize how each sub-rectangle contributes to the total.
In order to reduce clutter and confusion within the chart, it’s advisable to order the bars from the largest to the smallest and use colors wisely.
Bars or columns?
Stacked Bar Graphs place each value for the segment after the previous one. The total value of the bar is all the segment values added together. Ideal for comparing the total amounts across each group/segmented bar.
One major flaw of Stacked Bar Graphs is that they become harder to read the more segments each bar has. Also comparing each segment to each other is difficult, as they’re not aligned on a common baseline.
As already said in the grouped bars article, even the stacked chart can be visualized horizontally or vertically. Read the linked article to find out more.
How to create a stacked bar chart on BStreams
- Add a new project
- Drag the stacked bar or column and drop it on the canvas
- Select the sample dataset
- Choose one dimension and n. metric
- Click apply to show the result
Example of stacked columns & bars chart
The example below aimed to visualize the Top 20 artists who won famous prizes. By choosing the Artist field as the dimension and three metrics containing the number of the gold, platinum, and multi-platinum awards, the chart visualized the distribution of the top 20 artists with their awards. With the help of the Order feature in the Data section, we sort the columns, to ease the interpretation. Eventually, it’s visible that the dimension(Artists) are not readable.
The suggested solution aims to reduce the size of the values for dimension and also change the angle to each value. For this purpose, the values of each dimension can be customized from the X-Axis section on the Style panel.
If the number of dimensions that have been chosen for comparison is too many, the stacked bar chart is considered a better option. One of the slight drawbacks of the stacked bar chart is reading and following data at one glance. however, sorting the data in descending order might help with this issue.
Want to learn more about scatterplots? Email us at support@bstreams.io
If you haven’t checked our blog yet, give it a look and let us know what you think about it.
Read more here