Skip to content Skip to sidebar Skip to footer

Uploading Image in Tableau Has White Borders

This mail service, and the associated workbook, will evidence you 5 means of calculation images to your Tableau dashboards:

  1. As a shape on a worksheet
  2. As a shape in a Viz-in-Tooltip
  3. In a dashboard spider web object using a URL Action
  4. Equally a background image in the view
  5. Equally dashboard paradigm objects

A built example of each of these methods tin be establish in the associated workbook, which you can collaborate with and download from Tableau Public here. Looking through the workbook is the all-time manner to sympathise each method used in detail. The below post volition give a loftier-level overview of the steps involved in each method.

Adding Custom Shapes to Tableau

The showtime ii methods make utilize of custom shapes, so permit'due south first look at how y'all add these to Tableau:

  1. Notice or create ideally small-scale/low resolution images that yous want to utilize in your dashboard
  2. Copy the images from your calculator and paste them into a sub-folder within the Shapes binder of your Tableau repository

For these examples, I created a new binder called Christmas as the images are of that theme. This allows me to easily discover them within Tableau. If you lot've customised the location of your repository, the path will be different, otherwise it will be the default which is shown in the paradigm below:

These images are now available as shapes in Tableau desktop forth with all the other shapes (note, yous'll demand to click the Reload Shapes push for your new binder and images to announced if Tableau is already open):

Data Source

I'thousand using two uncomplicated data sources, each with 3 rows, which I'll use to assign shapes to and for diverse dashboard actions:

1. As a Shape on a Worksheet

This method uses the following steps (see the workbook for more details):

  1. Create a parameter with 3 values. I'one thousand using: Bauble 1, Bauble ii, Bauble 3
  2. Add the parameter to the view on the Shape shelf
  3. Assign the relevant custom image to each value of the parameter (you can only assign one at a time to the current parameter value, so change the parameter value and so assign the adjacent shape).
  4. Create a second view with the Picture field on rows and use this with a parameter action to change the value of the parameter
  5. When the parameter changes, the images changes

two. As a Shape in a Viz-in-Tooltip

The steps used for the method:

  1. To create the Viz-in-Tooltip worksheet, get-go put the Picture field on rows
  2. Set the mark type to Shape
  3. Add the Movie field to the Shape shelf and assign the relevant custom prototype to each picture
  4. Now all three images volition prove in the view.
  5. Create a view like to the previous example with 3 marks in the view using the Circle mark type
  6. Open the tooltip editor and insert the Viz-in-Tooltip canvass just created
  7. Now, when you hover over one of the circles, a filter is automatically applied so only one image shows in the Viz-in-Tooltip:

3. In a Spider web Object using a URL Activity

Steps used for this method:

  1. Upload your images to a hosting service such as imgur.com
  2. Copy the URLs for the hosted images and put them into your data source as a URL field
  3. Create the aforementioned view as before with three circles
  4. Add the URL field to the Detail shelf
  5. Add this view to a dashboard
  6. Add a Web Object to the dashboard (go out the URL blank)
  7. Create a URL dashboard action and pass the URL field to the Web Object

When you hover over each circle, the URL for the Web Object updates and a new image is loaded.

From a functioning perspective, I've constitute this method works very well and images load apace.

iv. Every bit a Background Image in the View

This method is less well know but can work really well in certain situations. One business use example is for visualising data on meridian of a flooring program images, which you tin can alter to show different floors of a building for instance.

Update: for a walkthrough of how to visualise data on floor plans using background images and filters, meet this blog post.

For this example, we'll stay with the Christmas theme and will be using a parameter calculation instead of a filter:

  1. As before, create a simple view with 3 circles using the Picture field (I'm using the 2nd data fix with three tree images this fourth dimension). This will be used to laissez passer the Picture value to a parameter using a parameter action.
  2. Create a second view with Ten on Columns and Y on Rows – these values are used to position the groundwork paradigm
  3. Create a parameter based on the Moving-picture show field then it has three values
  4. Create a adding chosen Groundwork that equals the value of the parameter and place this on the Detail shelf
  5. Go to Map > Groundwork Images and select the data source used in the view (Trees in the case)

half dozen. Click Add together Image… and scan to the image you lot want to use and assign the values 0 and 1 to the fields X and Y as shown beneath.

7. Click the Options tab then click Add… to add a condition:

8. In the popup dialog select the Groundwork calculated field that was added to the view before:

nine. When y'all select the field, yous will then be prompted to select a value that is present in that field. The background prototype will and then only prove when the field has this value. Because this field is taking the value of the parameter, only one value will be shown – the electric current parameter value (White Tree in this instance):

10. Click OK on the dialogs to get back to the view. And then fix the X and Y axes to go from 0 to 1. This will ensure the image fills the view.
11. Change the parameter value, then follow the same steps above to add the other two images, with the relevant conditions. You'll then take 3 Background Images, each with a different condition:

Now when you hover over the 3 circles, the parameter value is updated, this changes the value in the calculation and that determines which background prototype is shown:

5. As dashboard epitome objects

The final method is the easiest of all and only involves dragging Image objects into the dashboard from the side panel:

When your drag i of these to the dashboard, a popup window appears for you to browse to the image file to testify in the image object:

You can then resize the image object and add borders as needed, only like other dashboard objects. In the example beneath I accept one large prototype object with three smaller paradigm objects floating on top:

Decision

Over again, I'd recommend exploring the associated workbook for this post to look through all the dashboard deportment involved and other settings. Each method has its benefits depending on the state of affairs and the desired effect.

The master communication I would offer is to make certain your images are small in size to ensure a quick load fourth dimension. I've institute the URL action method with a Web Object is very quick, though it's non suitable for all use cases. As an example of where I've used this method, below is a section of a visualisation of a travel map I fabricated recently, where you can hover over a bespeak on the map and show a photograph of that location:

Thanks for reading!
Marc

costillothourany.blogspot.com

Source: https://datavis.blog/2020/12/24/five-ways-to-use-images-in-tableau/

Post a Comment for "Uploading Image in Tableau Has White Borders"