【问题标题】:Excel: Duplicated PlotOrder for two Series in a ChartExcel:图表中两个系列的重复绘图顺序
【发布时间】:2013-11-07 03:46:13
【问题描述】:

我有一个ChartObject,还有10 个Series。我有两个Series.PlotOrder = 1,还有两个.PlotOrder = 2。因此,最后一个Series.PlotOrder 是8。可以解释一下吗?我预计 .PlotOrder 的范围是从 1 到 .Count

我所拥有的证明是,在执行Sub 期间,我在cho 中获得了对相关ChartObject 的引用。然后,在即时窗口中:

? cho.Chart.SeriesCollection(cho.Chart.SeriesCollection.Count).PlotOrder
 8

? cho.Chart.SeriesCollection.Count
 10 

【问题讨论】:

  • Plot Order 被定义为图表组中所选系列的绘图顺序。 并且chart group一个集合具有相同图表类型的系列。您的系列中是否可能有几种不同的图表类型?
  • 天啊,这些年来我一直在研究图表,并认为自己是专家,而我对绘图顺序一无所知。我本来打算反驳你的评论,但后来决定检查一下它是否在 2013 年发生了变化。我一直测试到 2003 年,但我在所有方面都错了。
  • @Jon,请查看Series.PlotOrder Property (Excel)的官方网站:“返回或设置图表组中选定系列的情节顺序。读/写长。”这次他们提供了适当的信息(但通常我们需要 SE 才能到达那里)。
  • @Jon 你可能对我的Excel: In which ways can one create ChartGroups?编辑感兴趣

标签: excel charts series


【解决方案1】:

回复@chrisneilsen,但添加为评论太长了。

回复部分正确(我在这里总结一下我的发现):

  1. 重复的PlotOrders 是由于Chart 有多个ChartGroup

  2. 我没有不同格式的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?

【讨论】:

  • 图表在给定轴上按图表类型类别对系列进行分组。所以所有 XY 散点图系列都在同一个图表组中,除非一些在主轴上,而另一些在次轴上。
  • @JonPeltier - 这是链接问题的一个很好的答案。我不确定这是否是我的情况,但它很有用。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-03
  • 1970-01-01
  • 2021-12-17
  • 1970-01-01
相关资源
最近更新 更多