Talk about vain! For #TakeapartTuesday in this post, I’m going to look at one of my own visualisations.

The #MakeoverMonday recap posts often cite the need to keep your charts, text and everything else simple and accessible, to remove any barriers your audience may encounter when first glancing at the dashboard. The use of colour falls into the broader category of simplicity; use it sparingly and use it consistently.

My submission for #MakeoverMonday uses colour consistently in five areas, and this post will go into detail about a couple of those areas, and will touch upon the simpler applications of that colour consistency.

The title

No need for much detail here. It’s obvious when you think about it – if you colour dimension members in your title, then you remove the clutter of a separate colour legend, AND you immediately let your audience understand what they’re looking at, because the title is probably the first thing they see.

Screen Shot 2018-09-08 at 11.23.00

Dual-axis chart circles

The circles on the dual-axis DNA / barbell chart are coloured according to the gender of the worker. Again, no need to dally on the methodology here. As my chart was a dual-axis one, I used Measure Names on colour to create this effect, and coloured using a combination recommended on coolors.co.

Screen Shot 2018-09-08 at 11.28.29

Tooltips

Nothing clever here either. I have calculations which are gender specific, so it’s logical to colour those in the same way as demonstrated in the title and the circles on the dual-axis chart.

If you align those calculations in the Edit Tooltip window as shown below, then the tooltip functionality (more or less a filter-on-hover) will only colour the Country based whether they have a higher proportion of Male or Female workers.

Screen Shot 2018-09-08 at 11.29.37

A couple of the calcs underpinning the (Female Country) are shown here:

Screen Shot 2018-09-08 at 11.33.25

Screen Shot 2018-09-08 at 11.33.14

Now onto the two areas that I was quite smug about. Simple stuff for many (the majority?) but nice touches that are easy to implement and add to the overall colour consistency.

Colouring the line on a dual-axis chart

A fairly subtle feature of my main chart is that the horizontal line connecting the circles is also colour-encoded. The colour represents whether the Country has a higher proportion of Female or Male workers.

It’s a tiny, tiny detail but I feel it helps to reinforce the story at the Country level. It could be argued to be superfluous given that the right-most circle per Country (when the relevant parameter is set) already shows this, but I think it’s a nice touch.

Doing it, is a doddle:

Screen Shot 2018-09-08 at 11.38.06

It’s a boolean calculation (will only return True or False). Where it’s True then I can set the colour to the dark red I am using for Female, else it’ll be coloured green to be consistent with the Male colour used throughout.

This just gets dropped on the Colour card on the Line mark-type card.

Screen Shot 2018-09-08 at 11.42.02

This is an example of why dual-axis charts can be so tailorable – you can use different colour encoding for the different elements, but you should exercise restraint when doing so!

Country header is coloured

You can’t colour a header in Tableau based on a calculation. It’s a little bit frustrating, but it’s easy enough to workaround.

For my viz, I wanted to colour the Country names running down the page in the same way as the line connecting the circles on the dual-axis chart. As usual, the solution is simple.

Create a new sheet with Country on Rows and also on Text:

Screen Shot 2018-09-08 at 11.45.08

In the image above, I have right-aligned the label, in order for it to sit closer to the dual-axis chart in the final dashboard. How to colour it? Just reuse the [Line Colour] calc from a few images above.

Screen Shot 2018-09-08 at 11.46.56.png

See how the Header remains in a boring black, but the Dimension members are coloured? That’s just how Tableau works. We can just hide the Header to remove the boring black text, and we’re left with our colourful Countries.

In my viz, I had a parameter which allowed users to choose the Sort Order of the DNA chart. Clearly the Sort Order of this sheet has to mirror that logic, or things are going to get messy. That’s simple too:

Screen Shot 2018-09-08 at 11.49.24

This is the same as on the dual-axis sheet, and refers to this calculation:

Screen Shot 2018-09-08 at 11.49.35

The final detail was to bring the old “Dummy Header” trick into play, to allow me to manually control the point down the page where the first Country name shows (so it aligns with the dual-axis chart). Here’s how the dashboard looks without this trick implemented:

Screen Shot 2018-09-08 at 11.52.25

It’s misaligned horizontally because the dual-axis chart has a visible axis AND a hacky axis title above that. Those two components mean that the actual data is plotted further down that worksheet than our coloured Country sheet.

If I switch back to the coloured Country sheet, take a look at this:

Screen Shot 2018-09-08 at 11.51.23

The outlined “Countries” is the worksheet title. The data is plotted immediately below that. If I manually type “” into Columns, a dummy header is created:

Screen Shot 2018-09-08 at 11.55.34

Now “” only appears on the chart as that is the Field Label for Columns. Right-clicking that and turning it off, yields this:

Screen Shot 2018-09-08 at 11.56.45

See how Vietnam appears further down the page than it did before we added in the dummy header? Better still, you have absolute control over the depth of that white space, as you can just hover over the blank header until arrows appear at its lower-most point, and you can then expand or contract the header as required.

Screen Shot 2018-09-08 at 12.00.04

So that’s it. No major stuff but simple little tricks in Tableau that allow you to extend your use of colour consistency.

Advertisements