VizWiz

Launch, grow, and unlock your career in data

August 23, 2013

When left-aligned labels go right and right-aligned labels go left...a logarithmic love story

5 comments

While working on a project in datacamp this week, I was using a log scale on a bar chart because it was the most effective way to communicate.  (NOTE: See this article from Naomi Robbins for more info about appropriate use of log scales.)  I ran into an interesting phenomenon in Tableau, which I believe is a bug, but I kind of like.

Let’s start with a simple bar chart with three different label alignment options.

Some quick notes:

  1. The length of the bars in all of these examples is represented by the field “Value”
  2. The label is represented by the field “% of Value”. 
  3. These charts all use the default scale.

These charts look as I expect.  Auto, left and right align are placing the labels in the expected location.

However, look what happens when I change the scale to logarithmic.

What happened?

  1. Auto alignment has suddenly become left align.
  2. Left alignment is now right aligned, but inside the end of the bar.
  3. Right alignment is now left aligned.

When I filter down to just the top 10, the behavior changes again.

Final thoughts:

  1. I definitely think this is a bug, and I’ve reported this because Tableau is providing an inconsistent and unexpected user experience.
  2. I really like the look of the bar label inside the end of the bar.  I would like more flexibility with label alignment to be able to get this look intentionally.
  3. If you want to hear about lots of the cool stuff we’re doing with Tableau at Facebook, come here our talk at TCC13 at 11am on Wednesday – “Interworks: Data Discovery at Facebook: Why Culture & Flexibility Matter for Modern Analytics”.

If you want to play with it yourself, you can download the workbook here.

5 comments :

  1. I really like the look of the bar label inside the end of the bar, too.

    ReplyDelete
  2. Thanks Andy for sharing these label alignment effects in Tableau bar charts. I agree with you and Shawn, I like the label inside the end of the bar.
    I support your request to Tableau for more flexibility with label alignment.

    ReplyDelete
  3. Tableau v8 uses logic more logic than v7 and prior to pick label placement, I think they are trying to solve a hard problem, and there are now subtle details that are impacting where Tableau places the labels.

    For example, take a look at the axis ranges for your log scale all and top 10 views, notice that one set starts at 0 and the other at 1. It seems like in the log scale, the factor that impacts weather we get a left or right alignment when left alignment is chosen is the ratio of the longest bar to the shortest bar, or if there is just a single bar, eg for the label position switch thresholds show the top 1 or 2, or the top 234 or 235 when in log scale to see the label move.

    I agree it is frustrating when software behaves in an unexpected fashion, it highlights the root issue that there is a lack of documentation on the logic Tableau uses to place labels. Maybe the Tableau developers had a good reason for doing this way, but for whatever reason, they did not write detailed documentation on behavior conditions. Also we have no direct control over Tableau's behaviour. It is like Tableau is performing Auto Correct without the option to disable it, a very frustrating experience indeed.

    ReplyDelete
    Replies
    1. Thanks for the reply Joe. When I get an explanation from the developers, I'll be sure to pass it along.

      Delete
  4. that's quite a thorough review... great job!

    ReplyDelete