Peltier Tech Blog

Excel Chart Add-Ins | Training | Custom Solutions | Charts and Tutorials | PTS Blog

 

Main menu:

 
Peltier Tech
Chart Add-Ins

Peltier Tech Waterfall Chart Utility
Peltier Tech Cluster-Stack Chart Utility
Peltier Tech Box and Whisker Chart Utility
Peltier Tech Marimekko Chart Utility
Peltier Tech Dot Plot Utility
Peltier Tech Cascade Chart Utility

 
Excel Dashboards

Subscribe

Site search

Subscribe

Site search


Recent Posts

Recently Commented

Popular Posts

Archive


 

Categories


 

Privacy Policy

Creative Commons License
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Variable Width Column Charts (Cascade Charts)

by Jon Peltier
Monday, February 16th, 2009
Peltier Technical Services, Inc., Copyright © 2010.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Reader Joe left a comment on the Clustered-Stacked Column Charts article asking how to make column charts with variable width columns. Stacked versions of these charts are often used in marketing where the horizontal axis is divided up into the segments of a market, with the width of each segment proportional to sales in that segment, and the vertical axis is divided into the competitors in each segment, with each block proportional to that competitor’s sales or share of the segment.

I’ll provide my normal warning here, that using areas is not the most effective way to convey information. However, for people familiar with this chart type, it is an effective and customary chart.

PTS Cascade Chart UtilityCascade Chart Utility

I’ve received a lot of questions and comments about variable width column charts, or cascade charts, as they are often called. To address this attention, I’ve created a custom Excel utility to create cascade charts from simple data tables. You can read about it in PTS Cascade Chart Utility.

Variable Width Column Chart (Cascade Chart)

Laying Out the Data

For this simple example, we’ll use four entities, each with their own widths and heights.

Variable Width Column Chart - Original Data

Like most non-standard charts, we have to use a special layout for our chart source data. Here is how the above data is set up. The first column, the X values, comprise a cumulative total of the series widths: 0, 25, 75 (25+50), 150 (25+50+75), and 250 (25+50+75+100). Each of these values is listed twice. In between each of these values, I’ve inserted another row with the average of the values above and below, with orange text. These orange values correspond to dummy data which will provide labels later in this protocol.

Each series has mostly zero values or blanks. The X values for series Alpha range from 0 to 25: at X=0 the first Y value for Alpha is zero and the second is 100, the height for Alpha; at X=25, the first Y value is 100, and the second is zero. This provides the step up from 0 to 100 and the step down from 100 to 0. At the in-between point where X=12.5, Y is also 100. Data for other series is laid out in the same way.

The column labeled “dummy” holds Y values for a dummy series that will provide the labels in the column marked “Labels”. I’ve colored this text orange to indicate labeling helper data, corresponding with the inserted orange rows above.

Variable Width Column Chart - Data Laid Out for the Chart

Creating the Chart

Select the data in columns E through J and create a stacked area chart.

Variable Width Column Chart - 01

Select the “dummy” series (select “Data” and press the up arrow) and change its chart type to a line chart.

Variable Width Column Chart - 02

All the X values in column E are treated as text labels, equally spaced without regard to their numerical value. In Classic Excel (2003 and earlier) go to the Chart menu > Chart Options > Axes tab. The Primary Category axis is listed as Automatic.

Chart Options - Axes Dialog - Auto

Change this setting to Time-Scale. This is somewhat misleading, as Excel time-scale axes only consider dates and ignore times.

Chart Options - Axes Dialog - Time (Date)

The result is that all Y values for equal X values are vertically aligned, as if in an XY chart. Of course, Excel has helpfully converted the values into dates, spaced one month apart.

Variable Width Column Chart - 03

First change the spacing to 25 (or another value that makes sense with your widths).

Variable Width Column Chart - 04

Then change the number format of the axis labels to General (or to another format that makes sense with your widths).

Variable Width Column Chart - 05

Add Labels to the Variable Width Column Chart

If you didn’t need labels, you could have ignored the “dummy” series and the rows with orange X values. But usually you want labels. To do this, I use Rob Bovey’s free Chart Labeler utility. This utility adds a menu item called “XY Chart Labels” to the Tools menu. It works on any chart type that accommodates chart labels, not just XY charts.

Using the utility, assign the labels in the “Labels” column to the “dummy” series. The labels here have been positioned below the points.

Variable Width Column Chart - 06

These labels overlap with the axis labels, but there are a few ways to avoid this. You could position the labels above the points. (In this chart, I’ve removed the dummy series from the legend, and formatted it without lines or markers to hide it.) The legend itself could now be removed, because it’s redundant.

Variable Width Column Chart - 07

If the labels are crowded (the Alpha label barely fits within its column), you could rotate the text, but this makes it more difficult to read.

Variable Width Column Chart - 08

Depending on the purpose of the chart, you could hide the axis labels, and leave the “dummy” series labels below the chart.

Variable Width Column Chart - 09

There are a couple of alternative sets of data you could use for the “dummy” series, instead of the zero values that correspond to the bottom of the columns. The table below shows data that produces points which are located at the top of the columns, or at the mid-height of the columns.

Variable Width Column Chart - Alternative Dummy Data

Position the “dummy” labels above the points located at the tops of the columns.

Variable Width Column Chart - 10

Here is the chart again after hiding the dummy series.

Variable Width Column Chart - 11

Center the “dummy” labels on the points located at the mid-heights of the columns.

Variable Width Column Chart - 12

Once more without the “dummy” series.

Variable Width Column Chart - 13

You may be interested in Marimekko Charts, which are 100% stacked variable-width column charts.

Related Posts:

Bookmark and share this entry:
  • Twitter
  • Digg
  • Facebook
  • LinkedIn
  • del.icio.us
  • Technorati
  • StumbleUpon
  • Google Bookmarks
  • Reddit
  • MySpace
  • Slashdot
  • Yahoo! Buzz
  • Tumblr

Learn how to create Excel dashboards.

Comments


Comment from Colin Banfield
Time: Monday, February 16, 2009, 4:22 pm

“I’ll provide my normal warning here, that using areas is not the most effective way to convey information. However, for people familiar with this chart type, it is an effective and customary chart.”

Jon, the two statements almost appear to contradict each other. The first sentence is somewhat of an understatement. As you mention in “Peltier Goes Bar Hopping,” using area to encode data is even worse than using pie charts (I shudder at the thought of a stacked area chart). The example you use illustrates the problem well. Which area is bigger, Beta or Gamma? Alpha or Delta? In what way do you consider the chart to be “effective?”


Comment from Jon Peltier
Time: Monday, February 16, 2009, 8:06 pm

Colin -

Well, you got me. The best way to represent the simple numbers I plotted in this exercise is with an XY chart.

XY Chart

I was using this article as a lead in to the next one, which discusses Marimekko charts. These are stacked-variable-width-column charts, and that sounds terrible. But within the marketing community these are actually a staple, and the way they are used does not lead to the same confusion over areas that you reminded me about here. The line you quoted should probably be affixed to the next article, and the “effective and customary” description removed from this one.

In Marimekkos, the widths and heights are considered separately, so that the width indicates the relative size of a market segment, that is, the relative size of the entire column relative to other columns, and the height of each block in a stack represents the fraction of that block within its stack.


Comment from Colin Banfield
Time: Monday, February 16, 2009, 9:23 pm

Hi Jon: Please continue with the follow up discussion on Mekkos. There’s an interesing discussion on the topic over at Stephen’s site
http://www.perceptualedge.com/example13.php


Comment from gerdami
Time: Tuesday, February 17, 2009, 6:24 am

Just wondering whether this technique could render the “oil cost curve” attached below.

XY Chart


Comment from Jon Peltier
Time: Tuesday, February 17, 2009, 8:19 am

Gerdami -

This is exactly the technique one would use, with the following data and some appropriate formatting.

Oil Cost Curve Data

Oil Cost Curve Chart

Again, use of this kind of chart is subject to the limitations of encoding data using areas. Of course, the areas here have no real physical meaning. The widths correspond to predicted reserves of oil, which the vertical dimensions indicate a range of costs.


Comment from derek
Time: Tuesday, February 17, 2009, 3:39 pm

I really like your integrated dummy series on the right. I used to use a separate, neater and more compact series added using Paste Special.., but in the corporate environment I’ve found it breaks my colleague’s brains, and I get endless calls for support when they accidentally misplace something or need to make an adjustment. I’m learning never to attempt a chart type that will leave my control, that does not use a single simple wizardable rectangle as the base of the data. Sigh.


Comment from gerdami
Time: Wednesday, February 18, 2009, 4:30 am

Re: oil cost curve.

Jon, you’re great.
Thanks for sharing your knowledge.


Comment from Owen Bussey
Time: Tuesday, March 10, 2009, 8:24 pm

How would you do this same procedure in excel 2007? I am stuck on how to convert the x axis to time units so I get vertical columns.
thanks,
Owen Bussey


Comment from Jon Peltier
Time: Wednesday, March 11, 2009, 5:25 am

Owen -

That has been moved to the Format Axes dialog. Right click on the axis, choose Format Axis. The dialog opens to the pane shown below. Just above the first horizontal line, there are three radio buttons for Axis Type. Choose the Date Axis option.


Pingback from ggplot2: Variable Width Column Chart « Learning R
Time: Sunday, March 29, 2009, 7:29 am

[...] 2009 March 29 tags: chart, ggplot2, plot, R by learnr Jon Peltier uses several dummy series to create a variable width column chart in [...]


Comment from Gordo
Time: Thursday, October 29, 2009, 11:22 pm

My data set is a carbon cost curve with 20 points adding to around 40 kilotonnes. This means that some of the points are less than one kilotonne and I think the date function cannot handle this small number? I multiplied by 1,000 because my original data was in kilotonnes but now the numbeers seem to large and the graph refuses to cooperate either way! Is there a limited data range that we need to use? (Hint, if I mutiply by 10 it works like magic but the scale shows the wrong numbers)


Comment from Jon Peltier
Time: Friday, October 30, 2009, 8:53 am

Gordo -

The date axis cannot handle fractional values, and I know there is an upper limit as well.

Sometimes I have to use whatever works with the data (your factor of ten, for example), then hide the real axis labels and add a series which has dummy labels where I want them. See Custom Axis Scales using Dummy Series for examples.


Comment from Federico Boccardo
Time: Monday, November 30, 2009, 5:18 am

Dear Jon,

I’m working to build a waterfall chart with variable width coloumn that i can automatize througha macro in excel could you please show to me how I have to format my figures?
Could you give me an email address where I can send to you my work?
Thank you in advance

Federico

Write a comment

I welcome comments from my readers. If you have an opinion on this post, if you have a question or if there is anything to add, I want to hear from you. Whether you agree or disagree, please join the discussion.

If you want to include an image in your comment, post it on your own site or on one of the many free image sharing sites, and include a link in your comment. I'll download your image and insert the necessary html to display the image inline.

Read the PTS Blog Comment Policy.





Subscribe without commenting

Peltier Tech Waterfall Chart Utility Peltier Tech Cluster-Stack Chart Utility Peltier Tech Box and Whisker Chart Utility Peltier Tech Marimekko Chart Utility Peltier Tech Dot Plot Utility Peltier Tech Cascade Chart Utility

Create Excel dashboards quickly with Plug-N-Play reports.