LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Series order vs Legend Order in Charts

First off, Excel 2003.

OK, first some background. I'm getting variable data sets back from a
database. (Variable because what gets captured varies by station and run,
this part is out of my control) I use ADO to put the data into a worksheet,
OK.

I have a list of column headers where if they show up, I want to plot them.

I go through the column headers looking to see if they match, and if they
do, I add them as a series to the chart. In addition, if the column header
contains the word "weight", I want to plot that on a secondary axis and use
diamond markers to indicate those lines are using the secondary axis.

At this point, everything is fine, EXCEPT...

Although the order of the series I added is the order in which I added them,
the Legend Entries are not. My routine in words is

Create a new series
Assign attributes
If the name has "Weight" in it, I alter the last legend entry (Using .count)

This "works" when I ASS-U-ME the series I just added will be the last legend
entry.

In my test case, it works for the first six series I add:

FluidNumber
Pump Rate
Pump Volume
Oil Weight
Water Weight
Sand Weight

However, stepping through the code, the next .NewSeries shows up at postion
4 in the legend.

FluidNumber
Pump Rate
Pump Volume
New Series
Oil Weight
Water Weight
Sand Weight

I set Series.Name to "Sand DP" (from New Series) and since it doesn't have
the text "weight", I set LegendEntry(7) to be with no marker, which is not
what I want.

Any Ideas on what's happening or how to code this?

Thanks, Bob

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change series plotting order without changing legend order? PatrickM Charts and Charting in Excel 6 December 2nd 09 07:43 PM
How to change the series order in a LEGEND ONLY...not data Steve P[_2_] Charts and Charting in Excel 2 December 3rd 08 08:44 AM
Change series order in a legend ut_libet[_2_] Charts and Charting in Excel 2 June 11th 08 04:05 PM
Series order in Legend Jen[_4_] Charts and Charting in Excel 4 June 28th 07 12:46 PM
Series order in a chart legend. Phil Charts and Charting in Excel 3 September 28th 05 08:10 PM


All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"