The Theories We Learn
As much as I'm a huge fan of color, I'm also an advocate for reducing it whenever possible. You may have heard of Pre-attentive Processes and Gestalt Principles. Both are cognitive responses to the visual world that we make unconsciously.
As a visual designer, and previous marriage and family therapist, I know Gestalt well. If you are reading this, you likely have heard of Gestalt principles - those theories we learn in data viz about proximity, similarity, symmetry, etc.
However, as a therapist first, I learned about Gestalt as it related to a theory of therapy that focused on helping patients focus on the here and now - the present. Without going into a psychotherapy lesson, the concepts are the similar to those well known "principles". These are ways in which our brain groups and organizes our world to help us be more functional and effective.
Similarly, Pre-attentive Processes, are also ways in which our visual brain "pays attention" to certain stimuli while ignoring others. It's the whole "did you see the gorilla walking through the basketball game" study. (If you don't know what I'm talking about then you need to catch up!)
Okay, why all the preamble? Well, because there is a struggle in data viz between the need and desire to show data and often highlight that data with color but also constraining the attention to only certain data points. This tension often contributes to confusion among dashboard developers who become challenged with just "how much" color to use and when.
Using Color Sparingly
Historically, if a stakeholder asked me to create a bar chart which required some level of color encoding, I would agree without much interpersonal or design tension. Meaning I'd create something like the image below. I mean they did ask for sales by subcategory with category on color for reference, right?
But why comply? Is all this color needed? Really needed?
I don't think so. Especially in bar charts because bar charts inherently take up space. They have area. There is a height and width to them that both aids in our quick interpretation, but also takes up visual space and ink, for that matter.
So what is the alternative, you ask? Ah... Just a little less color but with the same data encoding and impact.
Coloring Only the Ends of a Bar Chart in Tableau
To reduce the visual intensity, I like to dial down the saturation of my bar charts. While you can easily adjust the opacity of the color in Tableau simply by adjusting the slider in the color mark card, I prefer reducing everything to gray except the essential pieces.
What if we only highlighted the ends of the bar to show the category as contextual information so that main insight - that of Sales - is the first thing observed from the length of the bars and the second insight is which category that subcategory belongs to.
Even better, we can label the ends and remove the axis using Tableau's "match mark color" to label the bars with the corresponding bar end color.
In my opinion, this view is so much more pleasing that the fully colored bars. So let me show you quickly how to create this bar chart with colored ends only.
Coloring the Ends of Bars Using Gantt Marks
The steps are relatively simple, but be aware that this technique requires a dual axis bar chart and if you aren't able to use a dual axis (perhaps you already have another need that requires it, or you are using measure values/names) then this approach won't work. In the event a dual axis is a go - then let's go!
Step 1: Create your bar chart
- Place a dimension on rows and a measure on columns
- Drag that same measure to columns again or select the pill and Cmd+Drag / Ctrl+Drag to the right to duplicate it
- Right click / select the drop down on the measure pill and select "dual axis"
- Right click / Cmd+click the axis and select "synchronize axes".
Step 2: Change Second Mark to Gantt
- Select the second mark type and change it to a Gantt bar
- Add the dimension to color on the Gantt mark
- Remove the tooltip from the Gantt mark and format it on the bar mark
- Add the measure label to the Gantt mark if desired
Final Bar Chart with Gantt End Lines
In the end, we have a less intense visual that still has color while not distracting from the actual measure of importance in the view.
Want the workbook?
If you want to check out this tip plus 4 others, you can find all these amazing yet simple Tableau design hacks in the workbook on my Public profile and please listen to the presentation I gave at the Newbies Tableau User Group (TUG) (I'm start around minute 42). Let me know if you have questions!
Cheers!
Lindsay
No comments:
Post a Comment