Show Table of Contents
The Shape property allows you to encode data by assigning different shapes to the marks in a data view.
When you place a dimension on Shape on the Marks card, Tableau separates the marks according to the members in the dimension, and assigns a unique shape to each member. Tableau also displays a shape legend, which shows each member name and its associated shape. When you place a measure on Shape on the Marks card, the measure is converted to a discrete measure.
Shape-encoding data separates the marks in the same way as the Detail property does, and then provides additional information (a shape) for each mark. Shape is the default mark type when measures are the inner most fields for both the Rows shelf and the Columns shelf.
In the view below, the marks are separated into different shapes according to the members of the Customer Segment dimension. Each shape reflects the customer segment’s contribution to profit and sales.
By default, ten unique shapes are used to encode dimensions. If you have more than 10 members, the shapes repeat. In addition to the default palette, you can choose from a variety of shape palettes, including filled shapes, arrows, and even weather symbols.
Click Shape on the Marks card, or select Edit Shape on the legend’s card menu.
In the Edit Shape dialog box, select a member on the left and then select the new shape in the palette on the right. You can also click Assign Palette to quickly assign the shapes to the members of the field.
Select a different shape palette using the drop-down menu in the upper right.
Note: Shape encodings are shared across multiple worksheets that use the same data source. For example, if you define Furniture products to be represented by a square, they will automatically be squares in all other views in the workbook. To set the default shape encodings for a field, right-click (control-click on Mac) the field in the Data pane and select Default Properties > Shape.
You can add custom shapes to a workbook by copying shape image files to the Shapes folder in your Tableau Repository, which is located in your Documents folder. When you use custom shapes, they are saved with the workbook. That way the workbook can be shared with others.
Create your shape image files. Each shape should be saved as its own file and can be in any of several image formats including bitmap (.bmp), portable network graphic (.png), .jpg, and graphics interchange format (.gif).
Copy the shape files to a new folder in the My Tableau Repository\Shapes folder in your Documents folder. The name of the folder will be used as the name of the palette in Tableau. In the example below, two new palettes are created: Maps and My Custom Shapes.
In Tableau, click the drop-down arrow on the shape legend, and select Edit Shape.
Select the new custom palette in the drop-down list. If you modified the shapes while Tableau was running, you may need to click Reload Shapes.
You can either assign members shapes one at a time, or click Assign Palette to automatically assign the shapes to the members.
Note: You can return to the default palette by clicking the Reset button. If you open a workbook that uses custom shapes that you don’t have, the workbook will show the custom shapes because the shapes are saved as part of the workbook. However, you can click Reload Shapes in the Edit Shapes dialog box to use the ones in your repository instead.
Below are some examples of views that use both the default and custom shape palettes.
When you create custom shapes there are a few things that you can do to improve how your shapes look and function in the view. If you are creating your own shapes, we recommend following general guidelines for making icons or clip art.
Suggested size - Unless you plan on using Size to make the shapes really large, you should try to make your original shape size close to 32 pixels by 32 pixels. However, the original size depends on the range of sizes you want available in Tableau. You can resize the shapes in Tableau by clicking Size on the Marks card, or by using the cell size options on the Format menu.
Adding color encoding - If you plan to also use Color to encode shapes, you should use a transparent background. Otherwise, the entire square of the image will be colored rather than just the symbol. GIF and PNG file formats both support transparency. GIF files support transparency for a single color that is 100% transparent, while PNG files support alpha channels with a range of transparency levels available on every pixel in the image. When Tableau color encodes a symbol, the amount of transparency for each pixel won't be modified, so you can maintain smooth edges
Note: Avoid including too much transparency around an image. Make the size of the custom shape as close to the size of the image as possible. Extra transparent pixels around the edges of the image can negatively effect the hover or click behavior near the image, especially when custom shapes overlap each other. When the actual shape area is bigger than what is visible, it can make hovering and clicking the shape more difficult and less predictable for users.
File formats - Tableau doesn't support symbols that are in the Enhanced Meta File format (.emf). The shape image files can be in one of the following formats: .png, .gif, .jpg, .bmp, and .tiff.