Use Background Images in Your Views
Background images are images that you display underneath your data in order to add more context to the marks in the view. A common use of background images is adding custom map images that correspond to a coordinate system in your data.
For example, you might have data that corresponds to several floors in a building. You can use background images to overlay that data on the actual floor plan of the building to give more context. Other examples of using background images include showing a model of the sea floor, images of web pages for analysing web logs, and even levels from video games to visualize player statistics.
While Tableau allows you to load dynamic maps from the online and offline provider, background images allow you to use your own custom images whether they are special maps or any other image that corresponds to your data.
Add background images to your workbook
When you add a background image to the view, you need to specify a coordinate system by mapping both the X and Y axes to the values of fields in your database. If you are adding a map, the X and Y axes should be longitude and latitude expressed as a decimal. However, you can map the axes to any relevant fields based on your own coordinate system.
To add a background image:
Select Map > Background Images and then select a data source.
In the Background Images dialog box, click Add Image.
In the Add Background Image dialog box do the following:
Type a name for the image into the Name text box.
Click Browse to navigate to and select the image you want to add to the background. You can also type a URL to link to an image hosted online.
Select the field to map to the x-axis of the image and specify the left and right values. When adding a map, the longitude values should be mapped to the x-axis using decimal values (instead of degrees/minutes/seconds or N/S/E/W).
Select the field to map to the y-axis of the image and specify the top and bottom values. When adding a map, the latitude values should be mapped to the y-axis using decimal values (instead of degrees/minutes/seconds or N/S/E/W).
You can adjust the intensity of the image using the Washout slider. The farther the slider moves to the right, the more faded the image will appear behind your data.
You can specify the following options using the Options tab:
Lock Aspect Ratio - select this option to maintain the original dimensions of the image for any manipulations of the axes. Deselecting this option allows the image’s shape to be distorted.
Always Show Entire Image - select this option to avoid cropping the image when the data encompasses only a portion of the image. If you lock both the axis in a view, this option may be negated.
Add conditions for when to show the image. Refer to Filter Data from Your Views(Link opens in a new window) to learn more about defining conditions.
Click OK.
When you add the x and y fields to the Rows and Columns shelf in the view, the background image displays behind the data. If the background image does not display, make sure that you are using the disaggregated measures for the x and y fields. To disaggregate all measures, select Dimension. Finally, if you’ve used the generated Latitude and Longitude fields for the x and y fields, you’ll need to disable the built in maps before your background image will display. Select to disable the built-in maps.
. To change each measure individually, right-click the field on the shelf and selectIn order to make the marks in a view more visible when placed on top of a background image, each mark is surrounded by a solid contrasting colour called a halo. You can turn mark halos off by selecting Format > Show Mark Halos.
Build a view with a background image
After you add a background image, you need to build the view in a way that matches the x and y mappings you specified for the image. That is, the fields you specified as x and y must be on the proper shelves. Follow the steps below to set up the view correctly:
Place the field mapped to the x-axis on the Columns shelf.
If you are working with maps, the longitude field should be on the columns shelf. It may seem backward at first, however, the fields on the columns shelf determine the values distributed across the x-axis.
Place the field mapped to the y-axis on the Rows shelf.
If you are working with maps, the latitude field should be on the rows shelf. It may seem backward at first, however, the fields on the rows shelf determine the values distributed across the y-axis.
Edit a background image
After adding a background image, you can always go back and edit the x and y field mappings as well as any of the options on the Options tab.
To edit an image:
Select Map > Background Images.
In the Background Images dialog box, select the image you want to edit and click Edit (you can also just double-click the image name).
In the Edit Background Image dialog box, make the changes to the image and click OK.
Enable or disable background images
Although you can add multiple images to a workbook, you may want to only use a subset of the images for a particular set of worksheets. For example, you may want to show a map of the entire United States of America on one view, and maps of individual states in other views.
Use the check boxes in the Background Images dialog box to enable and disable the images for the current worksheet. You can show several images by enabling multiple images on a single worksheet. For example, you may have several images that you want to tile in the background to make a larger background image.
To enable or disable a background image:
Select Map > Background Images.
In the Background Images dialog box, select the check boxes next to the images you want enabled.
Click OK.
Add show and hide conditions to background images
When you add a background image and enable it, the image will be shown automatically on any worksheet that has the required fields used in the view. To avoid showing an image on all the worksheets, you can specify show/hide conditions. Show/Hide conditions are conditional statements that you define to specify when to show the image. For example, you may have a floor plan image for a multi-story building. While each image is associated with the same coordinates (the corners of the building), you do not want to show the first floor map when looking at the third floor information. In this case, you can specify a condition to only show the first floor image when the Floor field is equal to one.
To specify show/hide conditions:
Select
and then select a data source.In the Background Images dialog box, select the image you want to add a condition to and click Edit.
In the subsequent dialog box, select the Options tab.
Click the Add button at the bottom of the dialog box.
Select a field to base the condition on. In the example described above, the field is Floor.
Specify when you want to show the image by selecting a value of the field. For this example, one is selected.
Click OK.
A condition statement is added to the image. In the building floor plan example, the condition statement is Only show the image when Floor is equal to One.
Click OK twice to close the Background Image dialog boxes and apply the changes.
When you add multiple conditions, the background image will only show when all conditions are met. For example, if a background image has two conditions on Property Name and Floor, it will only show when Property is Greenwood Estates and Floor is 3.
Remove a background image
When you no longer want to use a background image you can either disable it or remove it, making it unavailable to all worksheets.
To remove an image:
Select Map > Background Images.
In the Background Images dialog box, select the image you want to remove and click Remove.
Click OK.