A dimension is used to define how data is grouped in a visualization. In the charts that we have created so far, under the My first charts sheet, we have the following fields used as chart dimension: CategoryName and Country.
The following steps depict how to create a master dimension:
- If we are in view mode, click on the Edit button to enter the edit mode.
- Click on the Master items button to open the Master item pane.
- Click on the Dimension pane to expand it.
- Click on the Create new button in the Dimension pane to create a new dimension.
- In the Dimension editor panel, select Country from the field list. Keep the name the same as the field name.
- To define a default color for the dimension, use the color combo box to open the color picker and select the color yellow, which has the hex code #ffcf02.
- Click outside the color picker to close it and return to the Dimension editor panel, as shown in the following screenshot:
- Next, click on the Add dimension button to create the dimension in the Master library.
- Select the CategoryName field and repeat the same steps but define the following properties:
- Name as 'Category'
- Dimension color as dark blue with the hex code #4477aa
Now, there are two dimensions created in the Master library, as follows:
The master dimensions created here will be used in Chapter 7, Creating Data Stories.