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, Tableau separates the marks according to the members in the dimension, and assigns a unique shape to each member. The shape legend displays each member name and its associated shape. When you place a measure on Shape the measure is converted to a discrete measure.
Note that 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. The Shape property is available when you select the shape mark type from the Mark menu. It is the default mark type when measures are the inner most (farthest right) 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 the 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 such as filled shapes, arrows, and even weather symbols.
Double-click the Shape Legend 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 the Assign Palette button 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 of the Edit Shape dialog box.
Shape encodings are shared across multiple worksheets that use the same data source to help you create consistent displays of your data. 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. You can set the default shape encodings for a field by right-clicking the field in the Data window and selecting Default Properties > Shape.
You can add custom shapes by adding the shape image files to the Shapes folder in your Tableau Repository 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 many image formats including bitmap (.bmp), portable network graphic (.png), JPEG, graphics interchange format (.gif), and so on. Refer to the tips below to learn more about making useful shapes.
Place the shapes into the My Tableau Repository folder located in your Documents folder. The shapes should be put into a new folder inside the Shapes 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, open the Edit Shape dialog box by selecting Edit Shapes on the shape legend menu.
Choose the new custom palette in the drop-down list in the upper right of the dialog box. If you modified the shapes while Tableau was running, you may need to click the Reload Shapes button so the new shapes are available in the dialog box.
You can either assign members shapes one at a time, or click the Assign Palette button to automatically assign the shapes to the members.
You can return to the default palette at any time 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 the Reload Shapes button 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. Below are some tips to help you make good custom shapes. 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 the Size shelf 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 is dependent on the range of sizes you want available in Tableau. You can resize the shapes in Tableau using the Size shelf as well as the cell size options on the Format menu.
Adding Color Encoding - if you plan to also use the Color shelf to encode the shapes with color, 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 supports alpha channels with a range of transparency levels available on every pixel in the image. When Tableau color encodes the symbol, the amount of transparency for each pixel will not be modified, so you can maintain smooth edges.
File Formats - Tableau does not 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.