Welcome to MSDN Blogs Sign in | Join | Help

Combining Chart Types, Adding a Second Axis

Today’s author: Katherine Fifer, an intern on the Excel team.  Katherine is just wrapping up a summer of fantastic work, and today she is going to discuss how to create a combo chart in Excel 2007. 

Often it is useful to create charts which compare different types of data.  For example, you might want to compare share price with trading volume, or revenue with number of units sold, or poverty rate with unemployment and consumer confidence, or any number of other things. 

To quickly and clearly display data of different types, it can be helpful to plot some data series either with different chart types, on different axes, or both.  Let’s look at an example.

Suppose I work at a manufacturing company and I’d like to analyze the number of units we’ve sold over the last few months and the total dollars sold each month.  I’m hoping to identify trouble spots, such as high unit sales but low dollar transaction amounts, which may indicate that the units are being discounted too deeply. 

I could make two different charts – one plotting units sold by month, and one plotting transaction dollars by month.  However, it will be challenging to analyze the two charts separately.  I’d much rather create a chart like the one pictured below. 

Goal Combo Chart

 

 

 

 

 

 

 

 

 

 

 

 

With the right helpful hints, it turns out that making this kind of chart isn’t too tough.  First, I’ll walk through the two major steps (changing series chart types, and adding an axis) and then I’ll describe how to put the finishing touches on this chart.

STEP 1: So that we’re on the same page, I’m starting with the following simple data set:

Initial Data Set

 


 

 

 

 

 

I could also format this as a table by simply clicking “Format as Table” on the Home tab of the ribbon and choosing any of the styles.  By setting up a table, I can more easily read the data, and I can also do more advanced things like filtering the data (more on this in the Tables section of the Excel blog).   I’ve included what the table might look like below, but for simplicity’s sake, I’ll carry through the rest of the example without the table formatting.

Initial Data in Table

 

 

 

 

 

 

 

Fun shortcut: If you right-click a series, you can choose from the menu to either “change series chart type” to change its type or “Format Data Series” to change its axis.  If you want to do things quickly and are already familiar with this charting, you can go this route.  Otherwise, walk through the steps and return to this shortcut at the end.

Combining Different Chart Types

The first step in building a chart with more than one type is to actually set up a chart with just one type.  Here, I want a chart with columns and lines, but I’ll start with a regular column chart.  (Note: It actually doesn’t matter which chart type you start with, but if you’re working with a lot of series, I’d pick the chart type which applies to the majority of your series – it’ll mean less work for you later).

STEP 2: Select the data you entered in STEP 1.  Go to the “Insert” tab on the ribbon and insert a column chart (as shown below).

Insert Column Chart

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now we have a column chart with two series, both charted on the same axis.  This is all of our data, but it is not displayed in a meaningful way.  Because of the difference in scale between transactions and units sold, we can barely even see the units sold series:

Initial Column Chart

 

 

 

 

 

 

 

 

 

 

 

 

The next big step is changing the chart type of the “Total Transactions” series into a line. 

STEP 3: Select a series.  We want to select the series we’d like to change to a different type – in this case it’s the “Total Transactions” series.

                Selecting the series: You can select a data series in one of many ways.  I’ll outline the two most common here.  Note: This is where most people trip up, so pay careful attention to select a series rather than the whole chart or an individual data point. 

                Option 1: Click on the series in the chart.  Note: Don’t click on the legend text “Total Transactions”.  Rather, click on one of the red bars in the chart.  You should now see that series highlighted as follows (note the little blue circles on the red columns):

Transactions Series Selected

 

 

 

 

 

 

 

 

 

 

 

 

                Option 2: Click on either the Chart Format tab or the Chart Layout tab of the Ribbon.  (Note: these tabs only appear when you have the chart selected.  So if you don’t see them, click your chart to select it).  At the leftmost part of the ribbon on either of these tabs, there’s a section called “Current Selection”.  In “Current Selection” there’s a dropdown menu.  At this point, it probably says “Chart Area”.

Current Selection

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click this dropdown menu and select the series you would like to change – in this case, choose Series “Total Transactions ($)”.

Select Series

 

 

 

 

 

 

 

 

STEP 4: Change the selected series’ chart type.

First, get to the “Design” tab on the ribbon.  If you followed Option 1 above, you’re already there.  If you followed option two, you’re either on the Chart Layout or Chart Format tab, so you’ll need to click the “Design” tab.  Then click the left-most option on the ribbon “Change Chart Type”. 

Change Chart Type

 

 

 

 

 

 

 

This will bring up the Chart Type Picker.  Select the new type you’d like.  In this case, select the Line chart and hit “OK”.

Chart Type Picker

 

 

 

 

 

 

 

 

 

 

Now we’ve created a chart with two types (column and line).  In fact, you can combine far more than two types by repeating the process with another series, and selecting a different type from the chart type picker.  Line Column Chart

 

 

 

 

 

 

 

 

 

 

 

 

Adding a Secondary Axis

Our chart is still difficult to analyze, because the scale of the Transactions is much larger than the scale of the Units Sold.  As a result, we can barely read the Units Sold series and can’t gain any useful insight from the virtually indistinguishable columns.  The Total Transactions should be moved to a secondary axis, allowing the series to be scaled differently.

STEP 5: Select the data series you wish to place on the secondary axis.  In this case it’s the “Total Transactions” series.  Do this exactly as you did in STEP 3. 

 STEP 6: Navigate to the Format or Layout tab if you’re not already there.  (If you chose Option 2 in selecting the data series, you’re already there).  Now, in the “Current Selection” section at the far left, make sure the dropdown selection reads “Series ‘Total Transactions’” and then click “Format Selection” (right below the dropdown).

Format Selection

 

 

 

 

 

 

 

STEP 7: Clicking Format Selection with the series selected will bring up the Formatting dialog.  It will open to the Series Options tab with Primary Axis selected.  Click the “Secondary Axis” radio button and then click “Close”.

Secondary Axis Selection

 

 

 

 

 

 

 

 

 

 

 

 

You’ve now successfully added a second axis to your chart. 

Chart With Two Axes

 

 

 

 

 

 

 

 

 

 

 

 

Finishing Formatting Touches

The following things are just finishing touches for your combination chart.

STEP 8: Move the legend to the bottom.  Click the Chart Layout tab on the ribbon.  Then click “Legend” in the middle of the ribbon. Choose “Show Legend at Bottom”.

Legend Move

 

 

 

 

 

 

 

 

 

 

 

STEP 9: Change secondary axis labels to display dollar signs. Right-click the axis label and select “Format Axis”. 

Axis Selection

 

 

 

 

 

 

 

 

 

 

 

 

Then click the Number tab at the left-hand side of the dialog that has just opened up (the Format Axis dialog).  Then click “Currency” from the Category list.  If you don’t like a decimal place and subsequent zeros, remove the two rightmost zeros and the decimal place from the “Format Code”.  Then click “Add”.  Finally, click “Close”.

Currency Specification

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

STEP 10: Add axis titles. Go to the Layout tab on the ribbon and choose “Axis Titles”.  From the dropdown, choose “Primary Vertical Axis”.  Then choose whichever one you’d like – in this case I’d choose “Rotated Title”.  Type in the title you’d like.  Do the same for the Secondary Vertical Axis.

Axis Title

 

 

 

 

 

 

 

 

 

 

STEP 11: Add a chart title.  Navigate to the Layout tab on the ribbon.  Click “Chart Title” towards the left-hand side.  Choose whichever title you’d like (I’ve chosen “Above Chart” for mine). Input your title. 

Finally, you finish with the following combination chart:

Final

 

 

 

 

 

 

 

 

 

 

 

 

By repeating the steps above with more series and different types, you can make even more complex charts. 

Published Friday, August 24, 2007 2:06 PM by David Gainer
Filed under:

Comments

# re: Combining Chart Types, Adding a Second Axis

Saturday, August 25, 2007 10:55 AM by Hadley Wickham

There are very few situations where this is a good idea (unless you are deliberately trying to mislead the users of your graphic).  Have a look at http://junkcharts.typepad.com/junk_charts/2006/06/illusion_of_suc.html and http://junkcharts.typepad.com/junk_charts/2006/05/the_crossover_l.html for some examples and comments.

# Re: junkcharts links

Monday, August 27, 2007 2:33 AM by Hardly Wickedman

Hadley, you missed the point of using different graph types to disambiguate data belonging to different axis. Financial charts oftentimes use two axis, e.g., one for stock price and another for trade volume. And even using the same measure on two axis can be useful when comparing trends. Your logic appears to be flawed.

# re: Combining Chart Types, Adding a Second Axis

Monday, August 27, 2007 10:32 AM by six strings

thanks for this one --- this is exactly what I did   recently and whilst doing so I was thinking I must be wrong, surely there is a simpler way --- would it be possible to make this type of graph an option among the many excellent ones already there? eg second axis graph

# re: Combining Chart Types, Adding a Second Axis

Monday, August 27, 2007 2:25 PM by Scott Ruble [MSFT]

Regarding the question about providing some predefined combo charts among the existing chart types, this is something we are considering for a future release.  However, could you elaborate on the types of combo charts that you most commonly use?

# re: Combining Chart Types, Adding a Second Axis

Monday, August 27, 2007 2:37 PM by Bill Cross

I believe Excel 2007 will not allow you to do this with certain types of charts, (eg. bubble chart and line ). Am I mistaken?  

# re: Combining Chart Types, Adding a Second Axis

Monday, August 27, 2007 5:29 PM by Scott Ruble [MSFT]

That is correct, you cannot combine certain chart types such as bubble and line or 2D and 3D charts.  This is a limitation that also existed in Excel 2003.

# re: Combining Chart Types, Adding a Second Axis

Monday, August 27, 2007 5:29 PM by Scott Ruble [MSFT]

That is correct, you cannot combine certain chart types such as bubble and line or 2D and 3D charts.  This is a limitation that also existed in Excel 2003.

# re: Combining Chart Types, Adding a Second Axis

Tuesday, August 28, 2007 8:14 AM by jfm

When building combination charts as Katherine has described, my work often requires that I move away from a zero X-axis to two proportional Y-axes.  To do so, I currently use VBA to calculate and set the values.  The ability to tie worksheet cells directly to the primary and secondary maximum, minimum, and major chart axes values would eliminate the need for coding.  For future releases, would the Excel team consider adding the ability to tie worksheet cells to chart axes values?      

# re: Combining Chart Types, Adding a Second Axis

Tuesday, August 28, 2007 12:00 PM by Scott Ruble [MSFT]

Being able to tie worksheet cells to chart axis values is something we are definitely considering for a future release of Excel.

# re: Combining Chart Types, Adding a Second Axis

Tuesday, August 28, 2007 2:03 PM by Colin Banfield

<<Regarding the question about providing some predefined combo charts among the existing chart types, this is something we are considering for a future release.>>

<<Being able to tie worksheet cells to chart axis values is something we are definitely considering for a future release of Excel.<<

Scott: Firstly, unless these features are being considered for the *next* release of Excel, the statements are pretty irrelevant.  I doubt that anyone cares that a requested feature *might* be available, say 5-10 years down the road, which is possible with the 24-30 month release cycle and past history.

Secondly, given that the stated feature requests are quite old (possibly 8-10 years - I've now lost track of time), it's doubtful that it will comfort anyone to know that the features are being considered for some unknown future release.

If these chart features (and other chart features that may be mentioned subsequently) are being considered for the *next* release, it would be useful to mention this, with the disclaimer that there's no guarantee that they'll actually make it into the release.  On the other hand, if they are being considered for a release further out, then saying nothing would be non-committal (to you), non-frustrating (to those waiting patiently) and non-insulting (to those who will retire before the appropriate future release comes around).

Just my two cents.

# re: Combining Chart Types, Adding a Second Axis

Tuesday, August 28, 2007 4:50 PM by Scott Ruble [MSFT]

As a follow-up to Colin's reply, I appreciate the candid feedback.  Unfortunately, members from the Excel product team need to stay neutral to avoid setting any kind of expectations.  We do our best to gather constant feedback from our customers and assess the relative importance of the requests. This helps us prioritize the work.  However, until those decisions are made and we get closer to release, we cannot disclose what is in or out of the release.  In the past, we have had angry customers who built solutions which relied on features that got cut during the product development cycle.

# re: Combining Chart Types, Adding a Second Axis

Friday, August 31, 2007 12:04 AM by Moshe

Hadley may have missed the point that it can be useful as a tool for some, though he makes a very good point about how these charts can be misleading. You must be very careful and understand what you're seeing. For example, take the same data as in the example shown above and change the right hand side y-axis so that the 1,000 is where the 8,000 is. What you would have is a red line way above the blue bars. Alternatively, you could change the scale so that the 8,000 is where the 1,000 is. Then you'd have a flat line running through all the bars. The conclusion: Nothing. Very easy to be mislead.

# re: Combining Chart Types, Adding a Second Axis

Friday, August 31, 2007 12:08 AM by Moshe

As a follow up to my previous comment, you can do the same thing with stock prices and trade volumes. So I say good point Hadley and others beware of these types of charts.

# re: Combining Chart Types, Adding a Second Axis

Friday, August 31, 2007 12:11 AM by Moshe

As a follow up to my previous comment, you can do the same thing with stock prices and trade volumes.  So I say good point Hadley, and others should beware of these types of charts.

# re: Combining Chart Types, Adding a Second Axis

Friday, September 07, 2007 2:07 AM by muhammad

great, it is very useful in my presentation, weekly

# re: Combining Chart Types, Adding a Second Axis

Saturday, September 08, 2007 6:07 AM by Terence

Thanks, This info was very helpful.

T

# re: Combining Chart Types, Adding a Second Axis

Saturday, September 08, 2007 10:45 PM by Terence

very helpful data...thanks heaps

# re: Combining Chart Types, Adding a Second Axis

Wednesday, September 12, 2007 12:53 PM by tokunbo alege

The tutorial is useful and self learning stuff.

However, i wanted to use it to plot negative values of potential against time without much success.Hoping to take advantage of any advice.

Thanks.

# re: Combining Chart Types, Adding a Second Axis

Wednesday, September 12, 2007 2:55 PM by Scott Ruble [MSFT]

Tokunbo - I'm not clear on your scenario. Could you give an example of the data you are trying to chart?

# Showing status bar after customization

Monday, September 17, 2007 12:23 AM by clickmangesh@yahoo.com

Hi,

I am having one querry.

I am going to customize ribbon using XML. In XML I have written  <ribbon startFromScratch="true" >

which hides my status bar.

How to show status bar ??? What is control type and idMso of Status Bar ???

regards

-Mangesh

New Comments to this post are disabled
 
Page view tracker