Creating a Stacked Bar chart
A Stacked Bar chart is an extension of the bar chart where we use colors to represent additional information. These are typically used when we are trying to show a comparison within a particular category as well as across categories.
So, for example, in the previous recipe where we created a bar chart showing Sales across Region, we would additionally want to look at the performance of various product categories within a particular region and compare their performance across regions. To understand this, we will create a Stacked Bar chart.
How to do it…
Let us duplicate the Bar chart sheet by right-clicking on the sheet tab of Bar chart and then selecting the Duplicate Sheet option. Refer to the following image:
We will then rename the new sheet to Stacked bar chart.
Next, we will drag Category from the Dimensions pane and drop it into the Color shelf in the Marks card. Refer to the following image:
How it works…
In the earlier bar chart, the Sales across Region bar...