How to create a variable width column chart

Contents[Hide]

1. Overview

Variable width column chart, also known as bar Mekko chart, is a bar chart where column widths are scaled such that the total width matches the desired chart width and there are no gaps between columns. A good use case for this type of chart is for tracking growth against actual size for categorical data. For example, sales growth for a certain product line will be the column height and the total sales value for that product line will be the column width allowing us to easily spot which products lines are growing and what is their impact on our total sales activity.
 
This article shows you how to create a variable width column chart using a range chart. 

A variable width column chart
A variable width column chart

2. Steps

2.1. Prepare stacked data values

A variable width column chart requires measure values that are stacked along the bottom axis. A range chart by itself will not accomplish this so if you have un-stacked values, you will need to use the Cumulative Total formula function to help you calculate measures that will plot a running total of the bottom axis values.

The required stacked values should look like the values in the following sample Excel spreadsheet.

Excel data for variable width column chart
Excel data for variable width column chart

Once you have prepared the data, create a data connector in Dundas BI to connect to that data. For example, drag the Excel file to Explore.

Excel data connector
Excel data connector

2.2. Add a range chart

Create a new dashboard based on the Blank dashboard template.

Go to the toolbar, click Data Visualization, and select Range Chart.

Add a range chart to the canvas
Add a range chart to the canvas

2.3. Set up visualization bindings

Open the Data Binding Panel for the range chart. Click Bindings.

Drag-and-drop data columns from Explore onto the chart bindings as shown in the table below.

BindingData Column
SERIES 1 HORIZONTAL POSITION StartX
SERIES 1 HORIZONTAL RANGE END EndX
SERIES 1 RANGE START StartY
SERIES 1 RANGE END EndY
SERIES 1 SERIES GROUPING Name

The goal here is to set up a single range chart series where four measures are used to position each of the four sides of each bar/column.

If the axes were previously plotting non-numeric values, ensure both the left axis and bottom axis have their Scale Type property set to Numeric.

Set up chart bindings
Set up chart bindings

The easiest way to give each data point its own color from the palette is to make each one its own series using a series hierarchy: add a hierarchy to Columns (Series) on the metric set or move one there from Rows (Data Points).

3. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri