Questions from Tableau Training: Can I Move Mark Labels?

Data

Questions from Tableau Training: Can I Move Mark Labels?

by Elizabeth Kreitler
//

Our Certified Tableau Trainers are asked a myriad of questions each day. In this series, they share some answers.

Sometimes Tableau puts mark labels exactly where we want ‘em… But sometimes the default positioning of mark labels leaves class participants asking:

“Can I pick where my mark labels go?”

The answer is yes! You have two options for adjusting positioning for your mark labels:

  1. Adjust the alignment using the Label button
  2. Click directly on the mark and set it free to be wherever you choose
  3. Not really adjusting mark labels at all … but adding annotation as a label instead (that’s why I said there are only two options).

However, as with many decisions in life, these two options have different long-term effects as well as different effects depending on which chart type you’re using.

Option 1: Label Button Alignment

In the below example, a bar chart is labeled at the rightmost edge of each bar. Navigating to the Label button reveals that Tableau has defaulted the alignment to automatic. However, by clicking the drop-down menu, we have the option to choose our mark alignment.

Mark labels in Tableau

Tableau > Label > Alignment > Automatic

We have both horizontal and vertical mark label alignment options.

Horizontal and vertical alignment

See if you can guess which options produce this result …

Left-bottom alignment

If you said left horizontal alignment and bottom vertical alignment, you’d be right.

I created a line graph to show sales across months, and after dragging the Sales pill to Measures (or choosing Show Mark Labels in the Labels button), we have the same options for our line graph:

Line graph alignment options

This time, changing the alignment in the same way produces the following:

Changing alignment to bottom-left

Now, Tableau has moved every label to the bottom left of each point on the line chart. This option has overridden the default, therefore mark labels can overlap our line (as seen above). I’ll leave it to you to explore the best option for your scenario.

Finally, we have the pie chart: one in which labels are often used!

Tableau pie chart with labels

You can try the above methods all you want, but those labels aren’t going to budge a bit. Apparently, when faced with a pie, Tableau knows no direction (which is sometimes how I feel when faced with pie … but I digress). And herein lies the rub: How do we get those mark labels inside the pie? Or anywhere else for that matter?

Option 2: Set the Mark Free

This brings us to label-positioning tactic #2 (from above):

“Click directly on the mark and set it free to be wherever you choose.”

This method is as simple as clicking on the label you want to reposition — wait until you get the following cross quadruple arrow cursor (at least that’s what I call it):

Quadruple arrow cursor

Then, drag the label wherever you want. As you can see, in the below screen shot, I’m bringing it inside the pie:

Bring inside the pie

Lather, rinse, repeat and we’ve got a nicely labeled pie chart:

Nicely labeled pie chart

There’s only one issue.

Now that you’ve freed those marks to float around wherever you put them, they are free to float into places you don’t want them (e.g. if the chart changes). See what happens when I exclude EMEA (the orange slice):

Exclude EMEA

Our green mark label has floated right to the bottom of the green pie slice. Similarly, when I resize my pie, those marks get so jumbled we can’t even tell which piece of pie they reference:

Resize jumble

This is a risk you take any time you override Tableau’s default label positioning and free your labels by manually positioning them. So, if you’re now reconsidering this whole pie chart labelling ordeal, you’re probably wondering how to get the labels back to where they started. Right-clicking on the mark brings up the below menu, and under Mark Label we have the option to reset the position. This will get you back to automatically positioned labels.

Tableau menu to Mark label menu to Reset position

The above manual method will work on any chart type — it is just most often requested on the pie chart. So, the moral of the story is: You can reposition your labels, but beware of resizing or changing your chart with floating labels, as they become unpredictable!

Don’t Forget Option 3: Annotations

Lastly, we have the non-label way to get labels wherever you want. Don’t use labels! Use annotations instead, which you’ll have to come back to the blog to learn about!

And now that you’ve got your marks right where you want ‘em, find out how to format them in this blog post

Want More Questions from Tableau Training

  1. Questions from Tableau Training: Quick Filter Interaction
  2. Questions from Tableau Training: Labeling with Table Calculations
  3. Questions from Tableau Training: Speeding Up Presentation Views when Using Tableau
  4. Questions from Tableau Training: Dashboard Actions
  5. Questions from Tableau Training: Business Day Calculations
  6. Questions from Tableau Training: Adding Gaps Between Bars
  7. Questions from Tableau Training: When to Pivot Data in Tableau
  8. Questions from Tableau Training: Adding Conditional Formatting
  9. Questions from Tableau Training: Setting Weekday Start
  10. Questions from Tableau Training: How Do ZIP Codes Work in Tableau?
  11. Questions from Tableau Training: The Small Grey Bar Within a Quick Filter
  12. Questions from Tableau Training: Matching Mark Color
  13. Questions from Tableau Training: Showing the Null Indicator
  14. Questions from Tableau Training: Can I Manually Set the Colors of a Stepped Gradient?
  15. Questions from Tableau Training: How Can I Get Box Plot Data into a Crosstab?
  16. Questions from Tableau Training: How Do I Clear a Worksheet? Make a Copy?
  17. Questions from Tableau Training: Opening URL Actions Inside of a Dashboard
  18. Questions from Tableau Training: Can I Move Mark Labels?
  19. Questions from Tableau Training: How Can I Use My Current Report to Create a Viz?
  20. Questions from Tableau Training: Can I Create Text Hyperlinks on a Dashboard?
  21. Questions from Tableau Training: How Can I Transform My Crosstab into a Flat List?
  22. Questions from Tableau Training: Labeling the Top N
  23. Questions from Tableau Training: How Can I Customize Charts with Parameters?
  24. Questions from Tableau Training: Combining Measures into a Single Line
  25. Questions from Tableau Training: How Can I Create Custom Color Palettes?
  26. Questions from Tableau Training: Can a Top N Parameter be Nested Within Other Fields?
  27. Questions from Tableau Training: Conditional Scope on Tableau Calculations
  28. Questions from Tableau Training: Top Ten Plus N
  29. Questions from Tableau Training: Dynamic Label Positioning
  30. Questions from Tableau Training: Using Cross Joins to Solve Active Tickets
  31. Questions from Tableau Training: Top N Highlight Table
  32. Questions from Tableau Training: How to Use Specific Dimensions in Table Calculations
  33. Questions from Tableau Training: Moving Reference Line Labels
  34. Questions from Training: Comparing Metrics for Same Weekday in Previous Year
  35. Questions from Tableau Training: Colouring Specific Columns and Rows in a Crosstab
  36. Questions from Tableau Training: Creating a Custom Legend as a Sheet
  37. Questions from Tableau Training: How Can I Draw a 45-Degree Angle?
  38. Questions from Tableau Training: Down the Aggregation Rabbit Hole
  39. Questions from Tableau Training: Percent Change from Previous Period on a Map
  40. Questions from Tableau Training: Union File Names as Years
  41. Questions from Tableau Training: Conditional Coloring on Sparklines
  42. Questions from Tableau Training: Moving Column Headers to the Top of the View
  43. Questions from Tableau Training: Isolating Rank with Parameters and Calculations

More About the Author

Elizabeth Kreitler

Analytics Consultant
Compare Your Care: Which Hospitals Get Top Ratings? Have you ever spent time in a hospital? If you’ve been treated at a Medicare certified hospital, there’s a good chance you filled out a ...
How Does Tahoe’s 2016-2017 Season Snowfall Compare? Some of my best memories have been had on the ski slopes! My brother, Matt, and I are unique in loving the kind of terrain most people ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×

Love our blog? You should see our emails. Sign up for our newsletter!