Chart.GetChartElement(Int32, Int32, Int32, Int32, Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回有关指定 X 和 Y 坐标处的图表元素的信息。 本方法的与众不同之处在于只需指定前两个参数的值。 Microsoft Word 会为其余参数赋值,代码应在方法返回时检查这些值。
public:
void GetChartElement(int x, int y, [Runtime::InteropServices::Out] int % ElementID, [Runtime::InteropServices::Out] int % Arg1, [Runtime::InteropServices::Out] int % Arg2);
public void GetChartElement (int x, int y, out int ElementID, out int Arg1, out int Arg2);
abstract member GetChartElement : int * int * int * int * int -> unit
Public Sub GetChartElement (x As Integer, y As Integer, ByRef ElementID As Integer, ByRef Arg1 As Integer, ByRef Arg2 As Integer)
参数
- x
- Int32
必需 整数 图表元素的 X 坐标。
- y
- Int32
必需 整数 图表元素的 Y 坐标。
- ElementID
- Int32
整数 当 方法返回时,此参数包含 XlChartItem 指定坐标处的图表元素的值。 有关详细信息,请参阅“备注”部分。
- Arg1
- Int32
整数 当 方法返回时,此参数包含与图表元素相关的信息。 有关详细信息,请参阅“备注”部分。
- Arg2
- Int32
整数 当 方法返回时,此参数包含与图表元素相关的信息。 有关详细信息,请参阅“备注”部分。
注解
方法返回后的值ElementID
确定 和 Arg2
是否Arg1
包含任何信息,如下表所示。
xlAxis | 21 | AxisIndex | AxisType | |
xlAxisTitle | 17 | AxisIndex | AxisType | |
xlDisplayUnitLabel | 30 | AxisIndex | AxisType | |
xlMajorGridlines | 15 | AxisIndex | AxisType | |
xlMinorGridlines | 16 | AxisIndex | AxisType | |
xlPivotChartDropZone | 32 | DropZoneType | None | |
xlPivotChartFieldButton | 31 | DropZoneType | None | |
xlDownBars | 20 | GroupIndex | None | |
xlDropLines | 26 | GroupIndex | None | |
xlHiLoLines | 25 | GroupIndex | None | |
xlRadarAxisLabels | 27 | GroupIndex | None | |
xlSeriesLines | 22 | GroupIndex | None | |
xlUpBars | 18 | GroupIndex | 无 | |
xlChartArea | 2 | 无 | 无 | |
xlChartTitle | 4 | 无 | 无 | |
xlCorners | 6 | 无 | 无 | |
xlDataTable | 7 | 无 | 无 | |
xlFloor | 23 | 无 | 无 | |
xlLeaderLines | 29 | 无 | 无 | |
xlLegend | 24 | 无 | 无 | |
xlNothing | 28 | 无 | 无 | |
xlPlotArea | 19 | 无 | 无 | |
xlWalls | 5 | 无 | 无 | |
xlDataLabel | 7 | SeriesIndex | PointIndex | |
xlErrorBars | 9 | SeriesIndex | None | |
xlLegendEntry | 12 | SeriesIndex | None | |
xlLegendKey | 13 | SeriesIndex | 无 | |
xlSeries | 3 | SeriesIndex | PointIndex | |
xlShape | 14 | ShapeIndex | None | |
xlTrendline | 8 | SeriesIndex | TrendLineIndex | |
xlXErrorBars | 10 | SeriesIndex | None | |
xlYErrorBars | 11 | SeriesIndex | None |
下表描述了 和 Arg2
在方法返回后的含义Arg1
。
AxisIndex | 指定轴主要或辅助。 可以是以下 XlAxisGroup 常量之一: xlPrimary 或 xlSecondary。 | |
AxisType | 指定坐标轴类型。 可以是以下 XlAxisType 常量之一: xlCategory、 xlSeriesAxis 或 xlValue。 | |
DropZoneType | 指定拖放区域类型: 列、 数据、 页或行字段。 可以是以下 XlPivotFieldOrientation 常量之一: xlColumnField、 xlDataField、 xlPageField 或 xlRowField。 列和行字段常量分别指定系列和分类字段。 | |
GroupIndex | 指定集合中 ChartGroups 特定图表组的偏移量。 | |
PointIndex | 指定集合中序列中 Points 特定点的偏移量。 值 – 1 表示已选择所有数据点。 | |
SeriesIndex | 指定集合中 Series 特定序列的偏移量。 | |
ShapeIndex | 指定集合中特定形状的 Shapes 偏移量。 | |
TrendlineIndex | 指定序列中特定趋势线集合 Trendlines 中的偏移量。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈