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.

Why Are My Excel Bar Chart Categories Backwards?

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

I came across a blog post called Is it just me? (software defaults), which asks the age-old question, Why Are My Excel Bar Chart Categories Backwards? The post was in a new blog by Alex Kerin of Data Driven Consulting. Alex works on projects in analytics and dashboarding.

I have been asked this question a number of times, and being a founding member of Chart Busters, of course I know the answer. I’ve answered the question a number of times, but if I answer it here, it will become available for the ages.

I describe the problem and how to correct it. If you are really interested, I finish with an explanation of why this happens.

The Problem

Let’s use some very simple data to illustrate the problem.

Data for bar chart axis order study

Let’s make a simple bar chart.

Bar chart with backwards category labels

The labels were sorted from top down in the worksheet, but they appear from bottom up along the chart axis.

The Fix

It’s easy, if tedious, to correct the order of category axis labels. Select the axis, press Ctrl+1 (numeral one), the universal shortcut in Excel for Format This Object, and in Excel 2003 the following dialog appears.

Excel 2003 Format Axis Scale Dialog

The fix is simple: check the two boxes for Categories in reverse order and Value (Y) axis crosses at maximum category.

The protocol in Excel 2007 is the same, except the dialog looks a little different. You select the same options, but they are located far apart on the dialog.

Excel 2007 Format Axis Scale Dialog

This changes the order of axis labels in our bar chart.

Bar chart with appropriately ordered category labels

If you forget to make the value axis cross at the maximum category, the axis will now appear at the top of the chart. After reversing the order of the categories, the maximum category is at the bottom of the axis.

Bar chart with appropriately ordered category labels but value axis on top

Why Does Excel Do That, Anyway?

If we use the same data to make a column chart (line and area chart, too), the labels go from left to right, as expected.

Column chart with correct category label order

Take another look at the column chart, and note where the origin of the axis system is located. I’ve indicated the origin with a red circle.

Column chart with origin encircled

The values start low (at zero in this case) at the origin and increase in value as they move away from the origin. The category labels start with the first one next to the origin and later labels in the list extend further from the origin.

Now look at the bar chart and consider the origin of its axis system.

Bar chart with origin encircled

The values start low (zero) at the origin and increase in value as they move away from the origin. The category labels start with the first one next to the origin and later labels in the list extend further from the origin. Just like in the column chart.

Perhaps this is better illustrated if we remove the category data from the bar chart. In this case, Excel uses the counting numbers 1, 2, 3, etc. in place of the empty categories.

Bar chart with origin encircled and counting numbers used for category labels

Both axes have low numbers next to the origin and higher numbers further away.

The whole problem arises because Excel follows the same axis ordering scheme for bar chart category axes as for any other axis in any other chart.

This describes the mechanics of axis label ordering. But, 99% of the time, a user expects the axis labels to go in the same order top to bottom as in the data source. Why Are My Excel Bar Chart Categories Backwards? is still a valid question: Why can’t bar chart categories automatically be reversed? Alternatively, why can’t the options for a bar chart’s category axis default to:

Alternate Defaults for Bar Chart Category Axes

Works for me.

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 Adam
Time: Monday, November 23, 2009, 2:01 am

Thank you! I have always known about the “Categories in reverse order” but the other tick option is great!

Now that saves me having to manually sort the categories…small things! :)


Comment from derek
Time: Monday, November 23, 2009, 4:10 am

Really, why can’t the “column” and “bar” chart types be abolished altogether, in favour of a “rotate by 90°” option available for all chart types? The axis would still have to be moved to the bottom for those who like it at the bottom, but at least the logic will make sense to users. (a “transpose axes” option will avoid the axis having to be moved, but leave you with the “backwards categories” headscratcher, although I’ve never had a conceptual problem with it)

Also, dot plots would now be a natural Excel chart type, instead of something that has to be kludged using a scatter plot.


Comment from chrisham
Time: Monday, November 23, 2009, 5:28 am

At first I thougt of just skimming through! But thankfully I did not, the tick mark at the maximum value was something I did not understand. But this tutorial was just what the (Chart) Doctor Ordered.


Comment from Tony
Time: Monday, November 23, 2009, 9:49 am

Jon – great explanation as to why this happens. Also, I often prefer the x-axis labels to be positioned at the top of the chart versus the bottom. I guess we scan from top to bottom and it’s easier to understand the scale first before looking at where the data falls.


Comment from Mike Alexander
Time: Monday, November 23, 2009, 10:42 am

Jon: Thank you for finally explaining why this happens. I’ve worked around this problem for so long, I gave up wondering why it happens a long time ago.


Comment from Alex Kerin
Time: Monday, November 23, 2009, 10:58 am

Jon, thank you for the post. I suppose there’s an element of consolation that at least there’s a reason why they are not in the order we would expect them.

Tony brings up a good point as well – having the axis at the top is good, especially if it’s a chart that the user is not accustomed to.


Comment from Jon Peltier
Time: Monday, November 23, 2009, 11:25 am

I think many of us have been using charts with axes along the bottom and left edges of a chart since we took pre-algebra in middle school. Often it makes more sense to put the vertical axis to the right, since that’s often where you find the latest and most important data. But we stick to our conventions because they look right or feel right.

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.