Ryan Sleeper
Ryan shows you two techniques for using white space between dashboard objects and how to use the device-specific dashboard designer to display a dashboard with different dimensions when your stakeholders are viewing your dashboard on a phone.
Hi, this is Ryan with Playfair Data TV. And in this video, we’re going to continue building onto a dashboard that I often build whenever I’m conducting Tableau training. We’re going to talk about how to best use white space, I’m going to introduce you to the Layout pane and hybrid objects, and we will also be discussing device-specific dashboards. If you haven’t watched Part 1 of this video, I do encourage you to watch that. That’s how we built up to the dashboard that we are going to be continuing to build on and introduce even more features within the Dashboard interface.
But here’s where we ended up at the end of Part 1, over here in Tableau Desktop. This is a decent dashboard that we built in about four minutes. But there’s just a couple of things that I don’t love about it. There’s quite a bit of wasted real estate. I always try to maximize the white space and the real estate within a dashboard, and there’s quite a few gaps on this particular one so far. We’re going to fix that in just a few minutes here. But we’ve got some white space to the left of the map, to the right of the map, and at the bottom of this vertical layout container because the layout container’s only containing a color legend and a size legend and everything else is blank.
One way to alleviate this is to use what I call Hybrid Objects. Hybrid Objects is when you’re mixing tiled and floating objects. So far everything is in a tiled orientation, but I’m going to make my color legend and my size legend floating so that I can better utilize the white space on this dashboard. To make a tiled object floating, click on that object to highlight it. I know it is selected when that gray border appears around the object. Once that gray border is around the object, click on the down arrow, which will give you quite a few choices about what to do with this object.
One of those choices is to make this object floating. So I’m going to click floating, and now this object is still selected. But now that it’s floating, I can left click on that gray rectangle at the top of the object and drag it somewhere. I’ll put that to the left of my map. So in the Pacific Ocean there. We’ll do the same thing with our size legend, I’m going to first click on the size legend, once it’s highlighted, click this down arrow and make it floating. Notice now that there is nothing in that vertical layout container that was previously containing our two different legends, the rest of the view expanded to fill that white space. So we’ve already kind of taken care of some of the white space.
I will now put that size legend to the right of the map. So a little bit better utilization. We’re now going to talk about the Layout pane. As I’m eyeballing this dashboard, it appears that my Region and Sales legends are lined up vertically on the y-axis. But the Layout pane allows us to guarantee that. If I select an object, and then go to the Layout pane, so far we’ve been working on the Dashboard pane, I can see a couple of things about this object. I can see its exact location on the x- and y-axis. And this is in terms of pixels. If it’s 79 pixels in on the x-axis, that would be from left to right. So it’s 79 pixels in from the left hand side of this dashboard.
And then this 360 in the box for the y-axis indicates that it is 360 pixels down on the y-axis. So from the very top of the dashboard that would be zero, all the way down to 360. I can also determine the exact height and width in terms of pixels, but for now we’re just focusing on the alignment. So what I want to kind of record in my mind here is the location on the y-axis, 360. Now, let’s click on the Sales legend to see how close we were. Not very close to be honest. Came in at 343, and that’s one of the advantages to floating objects, is this type of precision. You can design down to the pixel.
So here’s one advantage or side effect of knowing the location on the y-axis. I can see that no these aren’t quite lined up. The Region legend is 17 pixels further down. So if I wanted to make it match the Sales legend, I would have to change the y-axis location from 360 to 343. And now I can rest assured that these are exactly lined up on the y-axis. Couldn’t quite see that when I was just eyeballing it.
You’ll notice some other things on the Layout pane here. You can change the border of an object, the background color of an object, and a feature that I really like is you can control the outer as well as inner padding. This just adds additional white space to this object. Outer padding is white space on the outside of the object. Inner padding is white space on the inside of the object. So if I were to bump this to 10, we see a vertical scroll bar there. I’ll alleviate that in a second. I’m going to resize this a little bit so that goes away again. And actually, to illustrate this white space let me give it a border as well just so we can see that. So that black border is going around the outside of the object, and then we’ve got 10 pixels in every direction of inner padding. So I just provided a nice extra little bit of white space.
Before this feature existed in Tableau, this is a big reason I was on Team Floating for most of my dashboards because it allowed me to design the dashboard down to the pixel, and I could build in that padding within my design. That’s not quite as big of a deal anymore because of these padding options that you’ve got. You could theoretically have everything on the view be tiled, and then just go to the Layout pane and add some nice inner padding around each of those objects.
The last thing we’re going to be discussing in Part 2 of this How to Make Your First Dashboard in Tableau video is device-specific dashboards. This lives back on the Dashboard pane. And what this does, it does require you to make an additional layout for a dashboard, but once you’ve got an additional layout, Tableau will identify what browser size the end user is using, and it will deliver the most appropriate-sized dashboard. The most common use case for this is when you build something at work, but you’ve also got stakeholders that might be looking at this outside of either the walls at work or outside of working hours, and they’re looking at your work on either a tablet or a mobile device.
So you might have one version that you’ve built at work on a desktop, and you might want to make a second version for an iPhone, if you know your boss is going to be looking at your dashboards on an iPhone. Before this feature that I’m about to show you existed, you had to make two separate workbooks and use some kind of HTML trickery to identify what browser the user was on, and then feed up the most appropriate workbook to have it best fit the device that they were on.
For that reason, I want to show you over here in Tableau Public, you’ll see a couple of examples within my portfolio where I’ve got two different workbooks. So here’s one example it says “NFL Concussions by Collision Source,” but then I’ve got a second version of it that says, “NFL Concussions by Collisions Source Mobile.” I had to literally make two separate files, post both of the files, use HTML on my blog where these were embedded to deliver the best experience. Well, Tableau has done that second part for us. We still have to make a different sized dashboard, but then Tableau will do the rest the work for us once this is posted to Tableau Public, Tableau Online, or Tableau Server.
To show you how this is done, I’m going to click the Device Preview button. That’s how you start a second layout. When you click that button, the Dashboarding interface will draw a border around how your dashboard will look on different devices, or what will fit on different devices. This first device that we’re looking at is a tablet. This actually doesn’t look too bad. Almost everything fits within a Tablet view. But let’s see what happens if I change the device type from Tablet to Phone. Not quite as good anymore. We only see 1 and 1/2 of our stacked bar. We see one region on the map, and we don’t even know there’s a sorted bar.
So what this would result in, if my end user was using a Generic Phone, which is Tableau’s word for it. It’s 375 pixels wide by 667 pixels tall. This would result in two different scroll bars. They’d have to scroll both horizontally and vertically. Most smartphone users are used to looking at something with a vertical scroll bar, but the horizontal scroll bar isn’t as good of an experience. So let’s try to get rid of that. We’re going to set up a second layout specific to a phone. To create a second layout, just click this button for Add Phone Layout.
Now notice, we’ve got two different versions, Default is our original, and Phone is our newly created layout. Tableau’s been making a lot of progress with these device-specific dashboards. So depending on which version of Tableau you’re using, Tableau may or may not have done even more of the work. I’m in the latest version as of November 2018. I’m using 2018.3, which just came out shortly after the Tableau conference. So it’s done quite a bit for me. It actually went ahead and changed the fit to Fit Width for me. It made the height of the dashboard taller, instead of 667, it made it 1,200 pixels to give it more vertical real estate. It also stacked some of these on top of each other.
So remember from my Default view, the line graph and sorted bar chart were next to each other on that third row of charts, on the Phone view, Tableau Desktop automatically changed that layout for me when I clicked Add Phone Layout. And it made the line graph stacked on top of the sorted bar chart. So this is actually already pretty good. It’s not perfect, but at least now my end user doesn’t have a horizontal scroll bar and they can see all of the four charts as they were intended to be seen without having to scroll horizontally anyway.
Now, here’s what’s great about this feature, when I go to publish this to either Tableau Public, Tableau Online, or Tableau Server, Tableau will automatically identify what browser that end user is using, and it will either deliver the desktop browser, or the Desktop version if the browser is wide enough to display the entire dashboard. Or it will display the Phone layout if it identifies that they are on a smaller browser, and they have a better experience if it delivered that second version.
But that was our first dashboard in Tableau from start to finish. I think altogether, it probably took us about 10 minutes to make a pretty decent dashboard with a good user experience that will work across devices. In other videos on this track, we’ll be discussing some tips and some of my favorite components to take these dashboards a lot further.
This has been Ryan with Playfair Data TV – thanks for watching!