• rds team

Using Reference Line To Align Labels

Updated: Sep 3, 2020


In Tableau, there are different ways to align chart labels. There are four ways to be precise – horizontal, vertical, directional & wrapping. This article explores the horizontal and vertical alignments. At the horizontal alignment you can either align your labels to the right, center or left. While at vertical alignment you can align your labels to the top, middle or bottom.

The image below shows different ways you can align labels vertically on a bar chart;

Although these three options are flexible enough, sometimes you need to try something different from the default settings. For example, a simple bar chart with labels aligned to the top center but slightly inside the chart, see below.

How can we create this in Tableau?

Using Superstores data set pre-packaged with Tableau app, let’s recreate the view above;

Build a simple bar chart

  • Drag dimension field Region to the columns shelf.

  • Drag measure field Sales to the rows shelf.

  • Chose Bar under marks card.

Make the charts dual & synchronize the axis.

Under marks cards, make one chart a Bar and the other a Gantt Bar chart.

  • Select the Gantt Bar chart.

  • Drag measure field Sales to the label shelf.

Align labels

While still on the Gantt Bar chart;

Select label, under Alignment select Bottom Center.

Executing this, hiding one of the headers and formatting the view we’ve.

I hope this article was helpful to you. To receive more of the Tableau tips and tricks, kindly join our mailing list by subscribing below.

Thank you for reading.

#Learningtips

Top 35 Data Visualization Widgets

Take your data visualization skills to the next level with this FREE guide!!

FREE Tableau Desktop Course for Beginners

Get started with Tableau, a data visualization tool that allows you connect to nearly any data and create interactive visualizations.