Making Dimensions Independent in a Trellised Chart

Published on October 30, 2015

When you enable trellis option in a chart, you get partitions of the dataset with the same chart type, scale and axes. The dimensions are segmented into multiple sub-groups. However, each sub-group shows the entire range of dimensions despite showing measures for only a subset of the range. You can mitigate this problem by enabling independent dimension scale.

In this post, I’ll show you how to create a new trellised stacked bar chart, with independent dimension scale on dataset SFPD Reported Incidents for 2014 [data source].

Populate the shelves from the available fields (Dimensions and Measures) listed in the left navigation menu.

Under Dimensions, select Segment, drag and drop it on the X shelf.

Under Dimensions, select date, drag and drop it on the X shelf. Make sure you have date on the right side of Segment; the left-most field controls the segmentation.

Under Dimensions, select pddistrict, drag and drop it on the Colors shelf.

Under Measures, select incidntnum, drag and drop it on the Y shelf.

On the X shelf, on Segment field, click the down arrow icon, click Pick values from a list.

The Pick values for Segment Names window appears.

Under Quarters, select Q1, Q2, Q3, and Q4.

Click Save.

On the X shelf, on date field, click the down arrow icon, select Date/Time Functions, and then select Month.

On the Y shelf, on incidntnum field, click the down arrow icon, select Aggregates, and then select Count.

Click Refresh Visual.

The main screen shows the trellised bar chart displaying the number of reported incidents in various districts in four quarters. The X-Axis shows the entire range of months despite having values for only three months. You can change the Axis range to bring only the months with values into focus by enabling Independent Dimension Scale.

EnableIndependent Dimension Scale

Click Settings at the top right of the screen. The Settings modal appears.

Click Axes in the Settings window. The Axes Scale options appear.

On the Axes Scale options list, select Independent Dimension Scale.

Click Apply. The bar graphs in the main part of the screen now show the only dimensions with values on X-Axes.

[Optional] In the Settings window, under the Axes tab, select Dynamically size graph to window size.

The trellised bar chart looks like this now:

Now, the trellised charts you have created shows the data by quarters, and you can see the number of incidents in each month of the quarter.