Documentation

Stacked Bar Chart

A great way to display accumulated metrics is to display them in a stacked chart, either as stacked bar or column chart. As we have seen previously, the bar and column charts are complementary: we would for instance prefer the bar chart for long-tail data labels or for large amounts of data that need to be compared, avoiding a clutter on the X Axis. On the other hand, the column chart is more adapted to show change over time.

 

We also saw that Stacked Column charts are very helpful when you need to represent a part-to-whole relationship, and so as to combine two charts in one. When it comes to stacked bar charts with horizontal visualization though, it can be a little bit different.

 

Keep in mind, as often with data visualization, that less is more and that overwhelming your bars with different categories of data can bring confusion. Stacked bar charts are helpful when you want to compare the proportion of two things which, summed up are using the whole X Axis (percentages for instance). You can also use them if you wish to visually display the distribution of your metrics, by adding two or more of your fields to the Y-Axis and use a stacked visualization.

 

Please, follow the steps below to learn how to create a stacked bar chart measuring more than one metric on the Y-Axis.

 

How to create a stacked bar chart in datapine

 

stacked bar chart created with datapine

 

  1. In the Chart Creator, add the metrics you wish to measure to the Y-Axis and additional fields to split up your data sets to the X-Axis and Filter by. In our sample above, we’ve added the Profit per Product and the Costs per Product to the Y-Axis and grouped it by Product Category.
  2. Then select Stacked bars as chart type.
  3. In Chart Options, you can now add totals to simply display the sum of all metrics for each of the categories in you X-Axis. If you wish, you may also add additional data labels showing the relative distribution of your metrics to the total by selecting Show all data labels (%).