Excel:图表中两个系列的重复绘图 [英] Excel: Duplicated PlotOrder for two Series in a Chart
问题描述
我有一个 ChartObject
,其中有系列
。我有两个系列
与 .PlotOrder
= 1,另外两个 .PlotOrder
= 2.因此,最后一个
系列
的 .PlotOrder
是8.可以解释?我希望 .PlotOrder
从1到 .Count
。
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
.
证明我所拥有的是,在执行 Sub
期间,我得到 cho
引用有问题的 ChartObject
。然后,在即时窗口中:
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
推荐答案
回复@chrisneilsen,但是添加评论太长了。
Reply to @chrisneilsen, but it is too long for adding as a comment.
回复部分正确(我在这里总结一下我发现的):
The reply is partially correct (I summarize here what I found):
-
重复的
PlotOrder
是由于Chart
有多个ChartGroup
我没有系列
具有不同的格式(它们具有不同的 ChartType
,但都是格式为 XYScatter
)
I do not have Series
with different format (they have different ChartType
s, but all with format XYScatter
).
分组不是由 ChartType
自动完成,而 ChartType
s,所以这似乎不是有多个 ChartGroup
的原因。它可能是自动的(可能是),但是基于其他标准。
The grouping is not automatically done by ChartType
, with the ChartType
s of my case, so this does not seem to be the cause for having more than one ChartGroup
. It may have been automatic (and it probably was), but based on other criteria.
详细信息:
使用呈现相同情况的其他图表(全部系列
格式为 XYScatter
),我已经执行了一个Sub转储图表中所有 ChartGroups
和所有系列
的信息。一旦它转储 ChartGroups
,并缩进两次,则在每个 ChartGroup $中转储
系列
c $ c>。
Working with another chart that presents the same situation (all Series
with format XYScatter
), I have executed a Sub to dump info on all ChartGroups
and all the Series
in the chart. Indented once it dumps ChartGroups
, and indented twice it dumps Series
in each ChartGroup
.
ChartObject 'Chart 36', no. series: 6
* ChartGroup, .Index: 1, no. series: 2
** plot order: 1, type: -4169, chart: 'Chart 36', chart type: 73, no. points: 17
** plot order: 2, type: -4169, chart: 'Chart 36', chart type: -4169, no. points: 17
* ChartGroup, .Index: 2, no. series: 4
** plot order: 1, type: -4169, chart: 'Chart 36', chart type: 75, no. points: 2
** plot order: 2, type: -4169, chart: 'Chart 36', chart type: -4169, no. points: 24
** plot order: 3, type: -4169, chart: 'Chart 36', chart type: 75, no. points: 33
** plot order: 4, type: -4169, chart: 'Chart 36', chart type: -4169, no. points: 5
因此,重复的 PlotOrder
由于 Chart
有多个 ChartGroup
(由@chrisnielsen正确猜出)。
Therefore, the repeated PlotOrder
s are due to the Chart
having more than one ChartGroup
(as correctly guessed by @chrisnielsen).
另一方面, ChartGroup
不要通过 GroupType
(如@chrisnielsen所述)在转储中看到。此外,我不知道如何创建 ChartGroup
,并且每个中包含
(我从来没有这样做)系列
ChartGroup
On the other hand, ChartGroup
s do not group series by ChartType
(as stated by @chrisnielsen) as seen in the dump. Moreover, I do not know how were the ChartGroup
s created and the Series
included in each ChartGroup
(I never did this intentionally).
为了测试分组是否可以自动完成,我创建了另一个 Chart
其中具有与上述相同的 ChartType
s的系列,它们都属于单个 ChartGroup
,如转储中所示
And to test whether the grouping may have been done automatically, I created another Chart
which has Series with the same ChartType
s as the one above, and they all belong to a single ChartGroup
, as shown in the dump
ChartObject 'Chart 1', no. series: 6
* ChartGroup, .Index: 1, no. series: 6
** plot order: 1, type: -4169, chart: 'Chart 1', chart type: 73, no. points: 17
** plot order: 2, type: -4169, chart: 'Chart 1', chart type: -4169, no. points: 17
** plot order: 3, type: -4169, chart: 'Chart 1', chart type: 75, no. points: 2
** plot order: 4, type: -4169, chart: 'Chart 1', chart type: -4169, no. points: 24
** plot order: 5, type: -4169, chart: 'Chart 1', chart type: 75, no. points: 33
** plot order: 6, type: -4169, chart: 'Chart 1', chart type: -4169, no. points: 5
所以分组不会自动由 ChartType
,与我的案件的 ChartType
。它可能是自动的(可能是),但是基于其他标准。
So the grouping is not automatically done by ChartType
, with the ChartType
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-我们/图书馆/办公室/ 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:图表中两个系列的重复绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!