Get the most out of the data points, or marks, on your view by learning how to change the mark type, color, size, label, and tooltip of each mark.
Hi, this is Ryan with Playfair Data TV, and in this video, I’m going to give you an introduction to the marks shelf, including the mark type, as well as the marks cards. To help illustrate, we’re going to build on this bar chart that was made in a previous exercise. The first thing that you can choose is the mark type. That’s what this dropdown menu is for.
The default mark type of a bar chart, obviously, is bar, so that’s why it says automatic. It’s got the same icon as the bar mark type. But you could choose something different. If we chose a circle, for example, that would create a dot plot.
You could also choose line. I want to point out a big caveat with this, though, or clarification. It’s important to remember that Tableau is just a software.
Somebody developed these rules that allow you to do certain things in Tableau. It doesn’t always let you do things, or doesn’t always prevent you from doing things, that you shouldn’t do. This is a really good example of that.
With the mark type of line, we’re now connecting points that, in my opinion, should not be related. We’ve got this blue pill on the column shelf for region, which means it’s drawing discrete headers. Those things are not really connected, but this mark type of line is implying some type of chronological relationship.
So be pretty careful with that. I only like to use the line mark type when it has to do with time, and I’m trying to look at some trend over time. So just pointing out little data vis rule, but also to show you that Tabeau lets you do things that you shouldn’t necessarily do. So I’m going to switch this back to bar for now, and I’m going to show you the applications of the different marks cards.
This is how you encode the marks. These are called marks cards because they’re going to influence the marks on the view, which in this case are these four bars. The first one is called color. The first way to use the color marks card is to just click on it and choose a different color for all the marks at the same time.
So I could choose orange if I like orange. Now, all the marks are orange. I can also color by a discrete dimension. So I could put region onto the color marks card. And each of my four regions will be given a discrete color.
Another little data vis rule of thumb here that I want to point out– there is this concept called cognitive load. That’s the amount of work that you’re putting on yourself and your end user to process the view. This is an example where we’ve double-encoded the marks, which has increased our cognitive load. It’s made it harder for us to process this visual.
We already had a discrete mark or bar for each of our four regions. We’ve now color-coded them by the same thing. So now, in addition to seeing how the columns are separated, we have to look back and forth to the color legend to ensure the color means the same thing as the columns do. So we’ve actually made it harder to process. So I personally would not color by the same thing as the dimension that’s drawing the columns.
One huge caveat with that, though, is if later on, if you’re planning to combine individual worksheets into a dashboard, double-encoding helps quite a bit because you can color all the different charts by the same thing, and it helps you draw correlations and compare things across different visuals in one compact space. So again, if we were looking at this bar chart in a vacuum, I probably would not color by region. If I was going to combine this bar chart onto a dashboard that had several sheets that use the dimension of region, color would be a good way for me to connect the dots between all the different worksheets.
You can also color marks by continuous measures. So if I were to put sales onto color, you’ll see what’s called a sequential color palette show up, and this is coloring the marks so that the higher the sales the darker the blue, and the lower the sales, you get a lighter blue. If you were wanting– well, let’s move onto the size marks card.
The size marks card works the same way as the color marks card, in that the first way you can use it is to size all the marks at the same time. Click Size. And if I drag the slider to the left, my marks get skinnier. If I drag the slider to the right, the marks get thicker.
You can also size marks by discrete dimensions. So if I put the region dimension on the size marks card, each of these bars now, in addition to having its own column, gets a discrete or unique sizing. Again, Tableau lets you do things that you shouldn’t necessarily do. This is a really bad use case and application for this but just showing possibilities here.
You can also size marks by continuous measures. So if I put sales onto size, now, the higher the sales, the thicker the mark; the lower the sales, the thinner the mark. This is also not a great application of this, but this would be really useful on charts like a scatter plot, where you want to make the circles bigger or smaller based on some performance metric.
I’ll drag that away for now and move on the label marks card. The first way to use the label marks card is to simply toggle them on. You do that by clicking the label marks card and clicking this box, Show Mark Labels. By default, if you’ve only got one measure on the view, that’s the measure that will show up on the mark label, but you can add additional information to that.
So by default, it added average profit, but let’s say I wanted to look at sum of profit and sum of sales. I could add both of those measures to the label marks card, and that’s what shows up on the mark labels. Notice here that Tableau tried to help us out a little bit. It rotated our labels.
By default, Tableau will show you as many labels as possible without them overlapping. This isn’t ideal for me. There’s a couple of ways I could change it.
You could hover near the right-hand side of this chart. And when that arrow cursor appears, left-click and drag it out to the right. And once those marks have enough room, the rotation will flip back.
You could also use this dropdown here. This is the fit of the view. The default fit of the view is called standard. I could change that by clicking this drop down, and there’s three additional options. All of them do exactly what they sound like.
Fit width will fill all the available space left to right, so that would have been another way to spread this chart out a little bit, give my labels more room. Fit height will fill all available room top to bottom, and entire view will just fill all available space on the view. This choice will really come down to what chart type you’re creating and how many marks you need to visualize. But I’ll go ahead and just change it back to standard. I kind of like this size for now.
The next thing you can do with the label marks card is customize them. You can only do this if you’ve got more than one thing on the label marks card, but we’ve got two right now, which unlocks a little bit more flexibility. If I click Label, I can now click this three-period icon next to this text box, and it will open a little word processor.
And what’s important about this word processor, in addition to all these formatting possibilities– so there’s over 160 fonts that come out of the box with Tableau. I can also change the size, the format, the color the alignment– but you can also use a combination of dynamic values and hard-coded text. So the use case for this– we’ve got profit and sales on the mark labels right now, but we have no idea what those numbers are. If we were to look at this in a vacuum, our end users would be very confused about what they were looking at.
But fortunately, we can combine dynamic values, which are identified with this gray shading, and hard-coded text. So for example, I could go in here next to the dynamic value for profit and type the word “profit.” And I could do the same thing on sales. Go next to the dynamic value for sales. Type the word “sales.”
Anytime you see this Apply button in Tableau, you can click that to preview the change before you accept it. So I clicked Apply. I see it looks good. I could then hit OK.
Just one quick point of clarification. When I say dynamic values, and they’re identified with this gray shading, it means that there’s going to be a different value per mark based on the performance of that metric. When it’s hard-coded, which does not have the gray shading, like the word “profit” and the word “sales,” those words are going to show up on every mark regardless of the value. I click OK, and we’re going to move on to the tooltip marks card.
We’ll come back to detail on a later video, but for now we’re going to move on to the tooltip marks card because they work very similarly to the label marks card. Tooltips are the information that appear when you hover over a mark. So when I hover over this second bar, I can see the region, average profit, sum of profit, and sum of sales.
They work very similarly to the label marks card in that, if I click on the tooltip marks card, it will open this little word processor, where I can use a combination of hard-coded text and dynamic values that are identified with the gray shading. The choice on whether you use a label or a tooltip really comes down to how you plan to distribute the report that you’re building, and I hope this is obvious. But if you’re creating a chart in a vacuum– maybe you’re going to take a screenshot of this and put it in a PowerPoint deck or copy and paste it put it and put it into an email– those would be static versions of the chart. So if you wanted to convey this profit and sales information, you would have to add those measures to the label marks card.
If on the other hand you plan to distribute the file via an interactive version of Tableau, so either to a fellow desktop user, maybe to Tableau Online, Tableau Server, Tableau Public, in all of those cases you could instead save the real estate on the label and provide that information via the tooltip. So it’s a great way to save real estate and provide a lot of additional context. Whatever fields you put under the tooltip marks card will show up on the tool tip.
So notice right now we’ve got four things, but I could add discount to tooltip and quantity to tooltip, and now we’ve got six things on the tooltip. So just an introduction, this will be really important as we make different chart types in Tableau. But that was just an introduction to how to encode marks, leveraging the marks shelf, and the marks cards within the marks shelf.
This has been Ryan with Playfair Data TV – thanks for watching!