I have a ChartObject
, with 10 Series
. I have two Series
with .PlotOrder
= 1, and two other with .PlotOrder
= 2. Therefore, the .PlotOrder
of the last Series
is 8. Can this be explained? I expected .PlotOrder
to span from 1 to .Count
.
Proof of what I have is that, during execution of a Sub
, I get in cho
a reference to the ChartObject
in question. Then, in the immediate window:
? cho.Chart.SeriesCollection(cho.Chart.SeriesCollection.Count).PlotOrder
8
? cho.Chart.SeriesCollection.Count
10
Reply to @chrisneilsen, but it is too long for adding as a comment.
The reply is partially correct (I summarize here what I found):
The repeated
PlotOrder
s are due to theChart
having more than oneChartGroup
I do not have
Series
with different format (they have differentChartType
s, but all with formatXYScatter
).The grouping is not automatically done by
ChartType
, with theChartType
s of my case, so this does not seem to be the cause for having more than oneChartGroup
. It may have been automatic (and it probably was), but based on other criteria.Details:
Working with another chart that presents the same situation (all
Series
with formatXYScatter
), I have executed a Sub to dump info on allChartGroups
and all theSeries
in the chart. Indented once it dumpsChartGroups
, and indented twice it dumpsSeries
in eachChartGroup
.Therefore, the repeated
PlotOrder
s are due to theChart
having more than oneChartGroup
(as correctly guessed by @chrisnielsen).On the other hand,
ChartGroup
s do not group series byChartType
(as stated by @chrisnielsen) as seen in the dump. Moreover, I do not know how were theChartGroup
s created and theSeries
included in eachChartGroup
(I never did this intentionally).And to test whether the grouping may have been done automatically, I created another
Chart
which has Series with the sameChartType
s as the one above, and they all belong to a singleChartGroup
, as shown in the dumpSo the grouping is not automatically done by
ChartType
, with theChartType
s of my case. It may have been automatic (and it probably was), but based on other criteria.The official site is not very helpful:
http://msdn.microsoft.com/en-us/library/office/aa173251%28v=office.11%29.aspx
http://msdn.microsoft.com/en-us/library/office/aa173240%28v=office.11%29.aspx
http://msdn.microsoft.com/en-us/library/office/aa195778%28v=office.11%29.aspx
This sparks another question, which I posted in
Excel: In which ways can one create ChartGroups?