Build responsive Tableau dashboards for mobile and desktop

//

Tableau automatically optimises a dashboard to fit the device, meaning it resizes for viewing on mobile devices.

Whether a desktop, tablet or various sizes of mobile phones, Tableau is responsive and can resize to fit the screen.

Tableau is responsive – tableau Enables Mobile Specific Layouts

Even better, it is possible for the exact same Tableau dashboard to have a different layout on a mobile device and a desktop.

Comparing the Desktop and Mobile views of Tableau dashboard
Desktop view vs mobile view

Responsive resizing of Tableau dashboards for different devices is great. It does create some additional work to ensure the dashboard is good on both layouts, but is worth the extra effort. For your users it provides them a far better user experience. In addition there is no need to create 2 separate dashboards, one specifically for mobile and the other for desktop.

As an example I created a dashboard to track coronavirus in England. The layout changes depending on whether you’re viewing on a mobile or desktop. Try it, open this post on both devices and see the difference.

Within that workbook there are 3 dashboards. The automatic mobile phone view for all 3 was not good.

For example this is the Default view of a Coronavirus in England map:

Map of Coronavirus in England

The default Mobile view may not be what you want

The automatic view on this on a mobile phone moved the filters and the image.

In addition it made the TAR Solutions logo too large and the map, the most important component, too small. Also the map isn’t visible until too far down the screen.

Therefore I had to edit it and change the layout on a mobile phone. This is the before and after editing:

Comparing the auto Tableau phone view and an edited version
The automatic mobile view may not be what you want

How to create a different mobile layout to the desktop layout

Firstly create the “default” view. This has to be the larger of the layouts because when checking the dashboard on other devices it shrinks to Phone.

You should see “Phone” as an option above Device Preview in the Dashboard section of your Tableau Desktop.

If not click Device Preview and scroll through the Device Types. To the right should be a button saying “Add Phone Layout”. Click that for the Phone option to appear. Similar buttons exist to “Add Tablet Layout” and “Add Desktop Layout”.

Once the phone layout is added the left of your screen should resemble the below image.

The default dashboard layout menu
The Device Preview enables switching between device layouts

See the “Default” view is selected by default? (no pun intended…) Click “Phone” to see how your dashboard will appear on a mobile. The Device Preview enables checking against specific phone screen sizes. As a general rule if it works on the smallest screen it will also work on the larger screens.

If you’re happy with the Phone layout and the Default then great, you’re finished. What if you’re not happy with the automatic Phone layout?

Edit the Mobile Phone layout

To edit the Phone layout click the padlock symbol to unlock the layout.

The padlock symbol of Tableau Phone view
The Padlock symbol is locked

Click the padlock and the symbol alters (see below) to unlock the mobile phone view and enable editing. A number of other options also appear which allow:

  • changing the size of the dashboard for mobile
  • altering the dashboard contents
Tableau dashboard layout unlocked to customise the mobile layout
The padlock is unlocked

Alter the mobile phone dashboard size

My recommendation is to Fit Width and set the Height long enough to show your dashboard contents. You can also set it to “Fit all”, which fits the entire dashboard to a single mobile phone screen. The Default Phone size is the same size as the Default view size.

Alter the dashboard contents

The entire dashboard layout for a Phone view can differ from the Default desktop view. Make sure the “Layout – Phone” is Custom to edit the Phone view.

Any combination of containers, images, text, web pages, etc can be within the mobile view but not the desktop view.

The menu to customise the dashboard layout
Add any of these items to the Phone view

However, one thing to be aware of, to use a worksheet on the Phone layout it also has to be a component of the Default layout. It isn’t possible to place worksheets only on the Phone view that aren’t also on the Default desktop view. Any sheet for the Phone view has to be on the Default view.

Usually we want the same items visible on both dashboards so this isn’t a problem. However, using the coronavirus in England example, check the Daily New Cases chart. In the desktop version the chart is only visible in a tooltip; hover over the local authority line chart and this extra information pops up in the tooltip.

The Tableau sheet visible only in the tooltip of the line chart
Hover over Birmingham trend line and see the Daily New Cases in Birmingham

On the mobile phone version the Daily New Cases sheet appears at the bottom of the dashboard. Expecting someone to tap a line in a line chart on a mobile phone isn’t a good user experience, therefore it has to be always visible.

When a sheet is included ONLY in a tooltip Tableau does not consider that as being on the dashboard.

The tooltip only sheet does not appear in the list of sheets on the dashboard. However, as mentioned, the worksheet needs to be on the Default dashboard to appear in the Phone sheet list.

It isn’t possible to add a new worksheet to the Phone view. It’s only possible to add new sheets to the Default view.

Therefore, to work around this, there is no option but to put the Daily New Cases sheet on to the Default dashboard. However I’m happy with the Default as it is and don’t really want to also find space for this new chart.

Fortunately there’s a way to put a sheet on a dashboard and “hide” it. Simply make it a floating component and place it somewhere inconspicuous. Alter the size to be 1 high and 1 wide. Now it should be completely unnoticeable.

A consequence of separating the Default and Phone views

Once the views are unlocked, once they are separated, changes are a little more effort. Any changes have to be made on both views.

For example, if you want to add / replace a worksheet on the existing dashboard add it to the Default view. Switch to the mobile device view. Notice the new sheet isn’t on the dashboard? As the mobile and default views are separate the new sheet requires placing on the mobile view. Since it’s now on the Default view it will appear in the list of available sheets for the Phone view. It doesn’t automatically appear on the Phone view dashboard because the views are separated.

In my opinion, especially in a Tableau environment where users are active both on desktops and mobile, this functionality is very useful. Introducing a small amount of extra effort to maintain two different views of the same thing is a small price to pay for the value it adds to user experience.

Leave a Comment