Excel:图表中两个系列的重复PlotOrder [英] Excel: Duplicated PlotOrder for two Series in a Chart

查看:323
本文介绍了Excel:图表中两个系列的重复PlotOrder的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 ChartObject 10 系列。我有两个系列 .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):


  1. 重复的 PlotOrder 是由于 / code>有多个 ChartGroup

我没有<$ c $不同格式(他们有不同的 ChartType s,但所有格式 XYScatter

I do not have Series with different format (they have different ChartTypes, but all with format XYScatter).

ChartType 不会自动完成分组, ChartType 我的情况下,所以这似乎不是有多个 ChartGroup 的原因。

The grouping is not automatically done by ChartType, with the ChartTypes 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 ),我已经对图表中的所有 ChartGroups 和所有 Series 执行了Sub转储信息。缩进一次 ChartGroups ,并缩进两次,在每个 ChartGroup Series 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 是由于图表有多个 ChartGroup (由@chrisnielsen正确猜测)。

Therefore, the repeated PlotOrders are due to the Chart having more than one ChartGroup (as correctly guessed by @chrisnielsen).

另一方面, ChartGroup 不会将系列分组 ChartType (如@chrisnielsen所述),如转储中所见。此外,我不知道 ChartGroup 是如何创建的,系列包含在每个

On the other hand, ChartGroups do not group series by ChartType (as stated by @chrisnielsen) as seen in the dump. Moreover, I do not know how were the ChartGroups created and the Series included in each ChartGroup (I never did this intentionally).

为了测试分组是否可以自动完成,我创建了另一个 Chart ,它具有与上述一样 ChartType 的系列,并且它们都属于单个 ChartGroup ,如转储

And to test whether the grouping may have been done automatically, I created another Chart which has Series with the same ChartTypes 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 ChartTypes 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:在哪些方法可以创建ChartGroup?

这篇关于Excel:图表中两个系列的重复PlotOrder的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆