Creating Diverging Bar Charts in Data Studio

  • street sign pointing both directions

Creating Diverging Bar Charts in Data Studio

One of the most challenging parts of creating a dashboard or report is finding the appropriate chart to convey your story.

Perhaps you want to display change in a metric over time—a time series would be helpful to show the fluctuations and trends. A snapshot in time? Consider a scorecard that displays a static metric. Or maybe you wish to easily compare metrics to one another—bar charts do a great job of this!

But what about when you need to compare categories of data? Democrat vs. Republican, Males vs. Females, or Satisfaction categories of data? While grouped bar charts may seem like an obvious choice, diverging bar charts are a great alternative, as they make trends more clear.

Here is how you can create a diverging bar chart in Google Data Studio:

Creating Diverging Bar Charts in Data Studio

  1. Once connected to your data source, create a new bar chart for the data you wish to have on the right-of-center side of your diverging bar chart.
    1. Add both dimensions to the chart that you wish to see data for. Ensure the first dimension is the grouping of how you want to see your data.
      In the example below, we are looking at 2017 TTC Customer Satisfaction by Age. For this chart, we have added Age as the first dimension, and Response Percentage as the second.
    2. In the Data tab, create and add a filter to the chart to ensure the appropriate right-of-center data shows. You may need to use a Regular Expression to do so!
      In the example below, we have filtered the right side to show the survey responses with positive sentiment.
    3. In the Data tab, adjust the Sort to ensure the data displays as you wish.
    4. In the Style tab, change the bar chart type to horizontal.
    5. In the Style tab, select Stacked Bars
    6.  In the Style tab, deselect Show Axes
    7. In the Style tab, scroll down and hide the legend.
    8. Colours may also be adjusted, as necessary, in the Style tab.
  2. Copy and paste the bar chart you have just created. We will now create the left-of-center chart:
    1. In the Data tab, create and add a new filter to the chart to show the left-of-center data only. In our example, this will be the data with negative sentiment.
    2.  In the Style tab, select Reverse X-axis direction.
    3. Adjust the colours in the Style tab as necessary
  3. Line up the charts, and add any axes labels as necessary.
    Note that you can move charts pixel-by-pixel in Data Studio by holding SHIFT while using the arrow keys. This will allow you to have the charts closer together, as we have below.

Use this tutorial to create something? Tweet us, or let us know in the comments below!

Complete list of posts in our 2018 edition 12 Days of Data Studio series:
1. ClickInsight Data Viz Gallery
2. Comparing Multiple GA Segments on a Chart in Data Studio
3. Exporting to PDF from Data Studio
4. Using Bookmarks Links in Data Studio
5. Keyboard Shortcuts for Data Studio
6. Creating Heat Maps in Google Data Studio
7. Using Charts as Interactive Filters in Data Studio
8. Creating Diverging Bar Charts in Data Studio (this post)
9. Creating Thumbnail Images of Data Studio Reports
10. Embedding URLs in Data Studio
11. Open Source Community Connectors for Data Studio
12. Create Custom Charts with Data Studio Community Visualizations

By |2019-05-17T11:55:17-04:00December 12th, 2018|7 Comments
Categories: Data Studio

7 Comments

  1. John 2019-11-12 at 20:18 - Reply

    Is there’s a video tutorial of this for better understanding?

    • Marc Soares 2019-11-20 at 17:21 - Reply

      Sorry, we don’t have a video tutorial available. Let us know if there are any specific steps that we can clarify.

  2. Athena 2021-03-15 at 08:07 - Reply

    Hi, thank you for this tutorial! In step 1 ii, it says ” In the Data tab, create and add a filter to the chart to ensure the appropriate right-of-center data shows. You may need to use a Regular Expression to do so!
    In the example below, we have filtered the right side to show the survey responses with positive sentiment.”

    How to create this filter? I created a filter as how it describes above. However, it only shows the data of positive opinion. In the output given in this tutorial, it shows positive opinion on the right side of the bar chart and negative opinion on the left side of the bar chart. How is this achieved?

    Thank you!

    • Nicole Harris 2021-03-15 at 15:54 - Reply

      Hi Athena, thank you for your question! It sounds like you are using the positive filter for both bar charts instead of only the right side. Make sure to create a second filter that only includes the negative sentiment for the left side of the bar chart, as outlined in step 2 i. Let us know if this solves your issue!

  3. Dee 2021-07-25 at 23:23 - Reply

    Hi there,

    I was wondering how a) you got the percentage to show up on the tool tip and b) you got the right percentage to show up given that the chart is actually composed of two different charts. Thanks for this tutorial and your help!

  4. Dee 2021-07-25 at 23:25 - Reply

    Actually, I’ve realized, what I don’t understand is the formula to filter the charts for the right-of-center data/left-of-center data since that’s how I’m assuming you got the correct percentages to show up!

    • Malka Peiris 2021-07-29 at 14:43 - Reply

      Hi Dee! Thank you for your question.

      For a), the tool tip is based on the metric you include in the chart, so if you place percentage as the metric that will show up in the tool tip.

      As for b), you are correct in the sense that the filters are what ensures that the correct percentage is shown for the correct graph. The way we filtered our graphs was by making sure the one on the right-of-center showcased the positive feedback and the chart left-of-center showcased the negative. We created an include filter that only included responses that matched the RegEx pattern “Very Satisfied|Somewhat Satisfied|Satisfied” for the positive graph and the opposite for the negative graph. In some cases, the data might be simple enough that you will not need to use a RegEx filter, in which case you can simply use another filter type like Equal to(=), Contains, etc.

      I hope this helps answer your question!

Leave A Comment