Wednesday, January 30, 2013

Basic Coloring in Tableau

Today, we'll talk about using colors to spice up your graphs in Tableau.  Colors are the easiest attribute for people to recognize.  You can have a graph with 3, 4, or 5 different colors; and each of them would be easily distinguishable at a glance.  We would be fools if we did not exploit this.  As usual, we will use the Superstore Sales sample data set in Tableau.

Step 1: Create a worksheet.
Profit Ratio by Sub-Category and Region
Step 2: Decide what you want to show with color

This text table is rather large and it's difficult to see what's important.  We can use color to show values that are important against those that are not.  We can use the typical negative versus positive scale to determine the areas that are profitable versus the areas that are not.

Step 3: Determine the vessel for your color

It is extremely easy to color a text table, you just drag "Profit Ratio" to the "Color" Shelf.  However, coloring in text tables is not easy to see, so why do it at all?
Text Table with Red-Green Coloring
So which areas are unprofitable?  Most of them are grayed out.  This doesn't help much.  In fact, it would be almost completely useless if the user was colorblind.

We can see three distinct issues here.  First, the text is not a very good vessel for the color.  Second, the continuous scale causes most values to be gray.  Finally, the color scale is unusable for colorblind people.  Let's fix these.

Step 4:
  • Change the "Mark Type" to "Square"
  • Right-Click on the Color Legend, Select "Edit Color"
  • Change the Palette to "Orange-Blue Diverging"
  • Check the "Stepped Color" Box and Type "5" in the "Steps" Box
  • Right-Click on any Square on the graph and Select "Format"
  • Under "Default -> Alightment -> Horizontal", Select the "Right Align" Option
  • Adjust the Column Width so that the Values do not overlap the Squares
Heat Map
This is what is referred to as a "Heat Map."  It is my favorite tool for quickly displaying differences across a single measure.  There's so much more that can be done.  Try creating Custom Color Palettes or using different shapes or background colors.  Thanks for reading.

Brad Llewellyn
Associate Consultant
Mariner, LLC

No comments:

Post a Comment