Fixing Aspect Ratios on Worksheets & Dashboards

A quick tip

Posted by David Velleca on January 24, 2019

Quick Tip - Forcing Viz Aspect Ratios

Disregarding the difficulty in visualizing a spherical representation or Earth on a flat screen, when we look at a map of the United States (or any map), the projection looks 'correct' to us because of the aspect ratio. The same goes for some types of data visualizations. If you struggle with manipulating axes and worksheet sizes when creating a dashboard, I've got a quick tip for you.

Tableau automatically knows to force the correct aspect ratio when you create a viz that uses a map as the base. We can leverage this same technique to force our vizzes to fit the desired aspect ratio by adding a backround image to our viz. By using a simple 1px x 1px transparent image, and defining the X and Y bounds for the image, we can force the correct presentation. The video below illustrates the concept, but let's step through it.

  1. First, either create an image, or download from here. Note that if you create your image, it doesn't necessarily have to be transparent (you can adjust the washout, but might as well be transparent).
  2. Go to the Map menu in Tableau Desktop (or Public), select 'Background Images' and then your datasource.
  3. A listing of any background images tied to your datasource will show up, and will be empty if you've not already added an image. Click 'Add Image'
  4. Browse for your image
  5. If necessary, select the appropriate X Field/Y Field. Then set the bounds for your image to fix your aspect ratio - for a 1:1 ratio, set as follows:
    • Left: 0
    • Right: 1
    • Bottom: 0
    • Top: 1
  6. If you are not using a transparent image, drag the washout slider all the way to the right. Then click 'OK'
  7. The image will now appear in the list of Background Images with the check box checked. Click 'OK' and voila.

The image snaps to the grid and maintains the aspect ratio. You can use this method for any type of viz with a defined X/Y range (including scatterplots), as well as forcing any desired aspect ratio. Check out the video below, and reach out if you have any questions!