Google Data Studio

Google Data Studio – Single dimension bar chart with color by dimension value

Consistency is key and the easy part of data visualisation. We just need to define some presentation rules and to apply it each time we work on the involved contexts.

One of these constant rules is the systematic use of the same color for a specific dimension value across a same report or a collection of reports.

For example:

  • Red for “mobile” device category (see the screenshot below)
  • Blue for “Google Ads” channel value
  • Green for “ecological” political part value 😉

Google Data Studio - Single dimension bar chart with color by dimension value

Inside Google Data Studio, these color rules are defined through a dedicated panel named “Dimension value colors”. It contains all reported values across all dimensions.

But, for the moment, there is a limitation regarding bar chart widgets. Color by dimension value is available only if the bar chart displays several dimensions. But there is a solution 🙂

To create a single dimension bar chart with color by dimension value

  • Select your single dimension bar chart
  • Go to the data tab
  • Add, one time again the same dimension, as secondary dimension
  • Go to style tab
  • Display your chart as stacked bars
  • Select the option “Color by” “dimension value”
  • Define the wished colors on the “Dimension value colors” panel, if it is not already done

Some explanations

  • Adding a secondary dimension activates the color options feature on Google Data Studio, including color by dimension value
  • Drilling down with the same dimension brings empty values for the crossing of dimensions values (mobile by tablet = empty) and keep bars for our data
  • Displaying as stacked bars removes empty lines

Le ciel est bleu

PS: I’ve published the short version of this post on my Twitter account the 1st of march 2019: @wissi_analytics