3 Ways to Make Beautiful Bar Charts in Tableau Adding love for bar charts by showing you how to make them more engaging in Tableau This video shows how to make bar charts more engaging by using Tableau formatting, axis rulers to set a baseline, and a tutorial for making capped bars.

3 Ways to Make Beautiful Bar Charts in Tableau

Adding love for bar charts by showing you how to make them more engaging in Tableau

This video shows how to make bar charts more engaging by using Tableau formatting, axis rulers to set a baseline, and a tutorial for making capped bars.

Hi, this is Ryan with Playfair Data TV. And in this video I’m going to show you three ways to make your bar charts more engaging. To start with I’m just going to make a default bar chart by double-clicking on Sales and double-clicking on Category.

Again I know for sure that Tableau invests a lot in R&D. They’ve done a lot of research on what are the best colors, the best mark types, the best formats for all of this stuff. But this default bar chart leaves quite a bit to be desired. At a minimum I would like to be able to read the individual dimension members on these columns.

So one way I can change that and my first tip with how to make your bar hurts more engaging is to just leverage the formatting options that are already available to you in Tableau. So to make these bars wider you could change the fit of the view. But I’m going to hover near the right side of the chart. And when that arrow cursor appears I’m going to left click and drag that out a little bit.

And when I do that I can now read the individual dimension members. But in my opinion the weight of the bars is now a little bit too heavy in relation to the rest of the view. So I’m going to make those bars smaller or skinnier by clicking on the Size marks card and dragging this slider to the left.
Notice on the Size marks card there’s a tick mark halfway over. If you don’t have a strong preference, that’s usually a good starting point. It kind of snaps to it also. So it’s easy to select. So once we’re on that middle tick mark bars are a little bit skinnier. The weight– the relative weighting is now quite a bit better.

Another thing I might do here is maximize the data-ink ratio. There’s two ways I could do it. On the y-axis in this particular chart all the values are between 700 and just over 800,000. So there’s quite a few repetitive tick marks in my opinion.

If you wanted to change that, you could right-click on the axis and choose Edit Axis. It’ll open this dialog box. And if I click the tick marks tab, I can fix those tick marks. Instead of every 100,000 maybe I’ll change that to every 250,000.

You can see that update in real time– looks good. I can click this X. And we’ve fixed the tick marks.

One big word of caution when you’re fixing tick marks is keep in mind that they are truly fixed. The reason it’s important to understand that is if– it’s fine for a static evaluation like this– if I was going to take a screenshot, put it in a PowerPoint or an email. But if I was fixing the tick marks in an interactive version of Tableau where those scales could possibly change, those fixed tick marks could become problematic. For example, if we filter down this bar chart and our highest value is now less than $250,000, we would no longer see any tick marks, because the first tick mark wouldn’t appear until that quarter of a million mark.

In this case, the values are all so close together that this is still redundant data-ink in my opinion. So in this case, I might opt to do a direct label instead of the axis at all. And you can do that by clicking on the Label marks card, clicking this box to show the Mark labels. Because there’s only one measure on the view that’s the value that will be shown on the label. And then I might just hide that y-axis by right-clicking on it and deselecting Show Header.

My second tip for you is to leverage something called an axis ruler. A lot of people don’t know about these. But– probably because they’re so subtle– but there’s a very light gray line on both the y-axis and the x-axis.

It’s so– so faint that you can barely see it. I don’t even know if my screenshot will actually pick it up. But those are called axis rulers. And by default I don’t love their formatting, because it kind of looks like the bars are just floating here. I like to format those axis rulers to give the bars a base to sit on.

To format the view, you can right-click anywhere in the view. And click Format. And Axis Rulers are on this last tab for lines.

If I click on that, one of the types of lines is called an axis ruler. If you navigate– we’re trying to change the axis ruler for the columns. So if I click Columns– and I’m just going to choose maybe a darker color like a navy and maybe a heavier weight for that line.

And now notice that the bars have a base to kind of sit on. And maybe I could just get rid of the axis ruler for rows. I’ll go to Rows. Notice how thin and light gray it is. It’s not really bugging me, because you can barely see it.

But just to be sure I’ll click None. And now that very thin axis ruler is gone. And the bars have a base to sit on.

My third and final tip for you is a little controversial I admit. This is another formatting trick that I found interesting and was inspired by Google Analytics. Whenever they’re showing bar charts in their real time analytics, the bars have a little– I call them caps. So I’m going to show you how to make capped bar charts.

This is purely for design. I want to point out that it’s got some severe limitations, which is if you’re not careful, it does look like– it could be interpreted as a stacked bar chart. But I’m going to show you how to make it and why I’m OK with this chart type.

It starts with a calculated field. So I’m going to right-click and click Create Calculated Field. And we’re just making a size– what– this calculated field would be the size of our caps. So we’re going to end up with just a little kind of a darker colored cap on each one of these bars. I’ll call this Cap Size.

And the size will be 30,000. And just to ensure I have the right aggregation I’m going to precede my number 30,000 with an aggregation of min– M-I-N. These will also be negative.

And I’ll explain that in just a moment. But to make this negative I’m just going to add a negative sign to the beginning of it. I’m going to click OK. That’s the whole formula.

The trick to getting this to work is to use a dual axis combination chart. On the left side of the chart’s going to be a mark type of bar. And on the right side of the chart is going to be a mark type of Gantt bar.

To start I’m going to put Sales onto the Rows Shelf a second time. I’ll use my favorite shortcut in Tableau, which is to hold down the Control key, click on a pill that’s already on the view, and drag it next to itself– creates a copy of it. At this point we’ve got the same chart on both rows. But because we have two different measures on the Rows Shelf they each get their own marks shelf over here.

And those can be edited independently of each other. So for the second row I can change the mark type from bar to Gantt bar. And I’m also going to turn these labels off.

Gantt bars– they’re similar to bar charts. So this dash is at the same height as the top of the bar. But what’s special about Gantt bars is you should size them by something. And we’re going to size these Gantt bars by our cap size. So I’m going to drag Cap Size to Size.

You can see they’re all equally sized now. The top of the dash is the value of the bar. And then it goes down $30,000 in sales.

I’m now going to synchronize my bar chart with my Gantt bar– my Gantt bars– by making this a dual axis. Most people learn this by clicking on the second measure and choosing Dual Axis. I’ll show you how to save one click, which is to hover over the y-axis. And when this a green triangle appears you can click that green triangle and drag it to the opposite axis.

Tableau tried to help us out here by changing the mark type of our left side from Bar to Circle. But I’m actually going to change that back. So I’m going to move to my first marks shelf, change the Mark Type from Circle to Bar.

And lastly, I want to ensure these are perfectly synchronized. You can do that by right-clicking on either axis and choosing Synchronize Axis. So at this point we do have capped bars. But what’s happening is they’re the same color. I’m going to fade out the background or the bar chart by clicking on the Color Marks card for the first row only, which is– which are our bars.

And I’m going to drag the Opacity slider to the left. And you can see now– you can kind of start to see this come together. I’ll just do– I’ll do 50%. And maybe I’ll give these a blue border also.

Actually even better we can make the color of the border match the Gantt marks pretty easily if we go to More Colors. We can pick the screen color and choose the color of those caps. Click OK. And that just gave a nice border around our bars.

I’ll hide this axis by right-clicking on it and deselecting Show Header. And now we’ve got capped bars. We haven’t changed the analysis at all. The height of the bar is still the value. We’ve got the direct labels.

But we just put a little bit of design polish on it. Again I completely admit some people might interpret this as a stacked bar. So you have to be very careful with it.

But I argue A, that it looks better and B, that that little cap can be used to encode the bars in a more subtle way. So you could use that to maybe color it based on whether or not the category was profitable– just a couple of ideas on how to use that. But those were three ways to make your bar charts more engaging.

I’m Ryan with Playfair Data TV – thanks for watching!

Tableau Chart Types Videos

Join Playfair+ Today

Members receive exclusive access to hundreds of visual analytics tutorials – plus much more.