Categories
Tableau

Borders, Padding, and Custom Lines in Tableau

One of the nice things about Tableau is the ability to add borders and padding to your finished dashboard without one single line of code.  And you can achieve this by simply going to the Layout tab:

So let’s give that a try!  For this exercise I have created some sample views using the all too familiar Sample Superstore data set.  I’m just going to drop three of the charts I’ve created in my dashboard shell.  Feel free to create and drop as many sheets as you would like.  Here’s my current dashboard:

Nothing too fancy, but I’m going to add my borders and padding now.  I can do that by simply clicking on every container and adding the desired border, weight of line, and padding:

I’ve now added a border for both the doughnut chart and my make-point map.  I’ve also increased the outer padding for both to 4, keeping all sides equal:

Now this looks okay, but what if I just want a border splitting the two sheets?  This is simple enough and we will use a container trick to add it.  So let’s remove the borders we added (you can also undo twice!):

Now grab a blank container from the Objects pane on the Dashboard tab.  I’ll just place in between my charts as so:

Next, go to the Layout tab and with the container selected, change the background to a color of your choice.  I’ve picked grey with a 50% opacity:

With the blank container still selected, use the container carrot to make the object floating.  In the selected item size section, change the width (W) to 1 and change the height (h) to your appropriate fit:

And there you go!  Now you have the left only border!

I’m going to polish it up a bit and place the doughnut and map in the same container so that I have an overall border for that section.  So the final looks like this:

There are some other ways to do it as well such as drawing your line in say a drawing tool or even PowerPoint works! I’ve even dragged a text box and just typed in ‘—‘ to create a line and brought that as a floating object into my dashboard.

As always, the Tableau Community is a great resource for some other ways to do it:

https://community.tableau.com/message/332404

By EA

Eman Alvani currently serves as Data Scientist for IBM Watson Health, focused on envisioning analytics of client data in the areas of Patient Engagement and Care Management. Eman has been with IBM for over three years and works within the technical team primarily focused on analysis utilizing Tableau as well as cross-segment opportunities. Eman is a certified Tableau Desktop Specialist, received his MBA from Pepperdine University, and holds a Bachelor’s from SMU