You just finished creating a beautiful Dashboard and realized that you might have to resize or reorganize it, for it to work better or just for aesthetic purposes. A Nightmare! Isn’t it. Formatting a dashboard takes a long time. Moving a single item can really mess up the whole layout especially if you are not using “Containers”. So let’s learn about containers which can save you ample time while formatting your dashboard.
Containers – What are they?
Layout containers are rectangular objects in which you can stack your dashboard items. That is, you can group your items and move them together fairly easily on the dashboard.
Depending on the possible stacking of items in them, they can either be Vertical or Horizontal.
Horizontal Container
You can stack multiple worksheets side by side, i.e. from left to right across your dashboard.
Vertical Container
Yes, you guessed it right!! In this, multiple worksheets can be stacked one over the other, i.e. from top to bottom of your dashboard.
How to use them?
Using them is fairly simple. Just drag either of the container on the dashboard. Keep in mind whether you are using a tiled container or floating container. In this post, I will only be referring to Tiled containers unless otherwise stated.
Once you have dragged a container on the dashboard, you can simply drag your worksheets in that container. The grey shaded areas you will see along the containers are the positions you can drop your worksheet in.
You can keep stacking your other objects in the container similarly. The height of the container as well as its individual objects can be adjusted. Just select the object/container you want to adjust the height of, press the caret, select ‘Edit Height’. It will bring a pop window in which you can enter the desired height.
One thing to note here is, with multiple objects in container, it can be difficult to select container. To select a container, select one object and choose ‘Select Container’ from the drop down menu.
Another way is to go to ‘Item Hierarchy’ section at the bottom of the Layout Pane. In here, you can drill down to each object and selecting that object in item hierarchy will select that object in the dashboard view.
Remember, when selected, Layer containers have a blue borders while objects have grey borders.
Building a dashboard
So our aim is to recreate following Dashboard:
Superstore dataset is used in this example. We have 5 objects in this dashboard view: 3 worksheets and 2 text boxes.
Start by planning how many containers you would require. . Let’s doodle what we need to get the desired view. So we need 3 Vertical and 1 horizontal container. So we can now commence building our dashboard.
- Press shift and drag vertical container in the view. This will bring vertical container as a floating. This is an important step as it will let us get rid off the tiled layout Tableau creates automatically. Go in Layout and set x and y position of the container as 0. Set the w and h in size as the width and height of your dashboard. This way your vertical container will cover your entire view.
- Now drag a horizontal container in the view. It will come as a tiled container. It will let us stack the two vertical containers with worksheets next to each other. Lastly, drag a vertical container in this horizontal container.
- In this new vertical container, first drag a text box at the top and type SALES. Drag all worksheets related to sales one below the other. Adjust the height of all the objects as required.
- Drag another vertical container and place it next to the last vertical container (in grey shaded area) and repeat step 3 for Profit Ratio worksheets.
- The last thing that remains is to set the layout of two vertical containers and objects. To get the above view, set outer padding of 20 for containers and 4 for objects and can but a black border for containers.
Here, you have it! A dashboard built using containers which is easy to format and looks sleek and neat.