回复@chrisneilsen,但添加为评论太长了。
回复部分正确(我在这里总结一下我的发现):
重复的PlotOrders 是由于Chart 有多个ChartGroup
-
我没有不同格式的Series(他们有不同的ChartTypes,但都使用XYScatter格式)。
分组不是由ChartType 自动完成的,我的情况是ChartTypes,所以这似乎不是拥有多个ChartGroup 的原因。它可能是自动的(也可能是),但基于其他标准。
详情:
使用另一个呈现相同情况的图表(所有Series,格式为XYScatter),我执行了一个Sub 转储图表中所有ChartGroups 和所有Series 的信息。缩进一次它转储ChartGroups,缩进两次它转储Series 在每个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
因此,重复的PlotOrders 是由于Chart 有多个ChartGroup(正如@chrisnielsen 正确猜测的那样)。
另一方面,ChartGroups 不会按照转储中的ChartType(如@chrisnielsen 所述)对系列进行分组。此外,我不知道ChartGroups 是如何创建的,Series 包含在每个ChartGroup 中(我从来没有故意这样做)。
为了测试分组是否可能已经自动完成,我创建了另一个Chart,它的Series与上面的ChartTypes相同,它们都属于一个ChartGroup,如图所示转储
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 自动完成的,我的情况是ChartTypes。它可能是自动的(也可能是),但基于其他标准。
官网帮助不大:
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
这引发了我在中发布的另一个问题
Excel: In which ways can one create ChartGroups?