It is also possible to create bar graphs which help you "stacking" data in columns. This type of graph is useful when you want to compare two or more sums of elements and visualize at the same time the contribution of each element to these sums.
Let's come back to our previous example. In the original table, the precipitations for 2016, 2017 and 2018 were recorded every month. We thus have 12 categories (jan
, feb
, mar
...) which are common to each recorded year. In the article about how to create a clustered bar graph, it was possible to compare elements like months for different years (precipitation for January 2016, 2017 and 2018, for example), but the total amount of precipitations for 2016, 2017 and 2018 was not "visible". Using a stacked bar graph, we will be able to add monthly precipitations on top of each other, and thus observe the total amount of precipitations for each year. Let's create this chart.
A blank chart appears. Right-click in it and click Select Data...
. In the new dialog box called Select Data Source
, click Add
under Legend Entries (Series)
. The next box helps you define your data series. Here, we will have to create as many series as there are categories to stack up, so 12 series for 12 months. Each series will contain the amount of precipitations for each year. Thus, type in "Jan" under Series name
and under Series values
, select the range of data to display (D2;D14;D26). Finish by clicking OK
.
We'll keep adding the series corresponding to the monthly precipitations. Back to the box Select Data Source
, click Add
under Legend Entries (Series)
. Type in "Feb" under Series name
and under Series values
, select the range of data to display (D3;D15;D27). Finish by clicking OK
. The chart updates itself and now shows the "Feb" series on top of the "Jan" series. Keep entering the 10 remaining series in the same manner.
Once all the series are entered, the resulting graph looks like this. At this point, one can easily visualize the total amount of precipitations for each of the three years (represented by the height of the bar), and the monthly precipitations (represented by the colorful boxes). But it is also quite confusing due to the complexity and amount of colors... Adding a legend to the chart often becomes necessary for this type of chart.
Download the original table here.