Table of contents
TOC
折叠目录
展开目录

点对象 (PowerPoint)Points Object (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

在图表中的指定系列中的所有对象的集合。A collection of all the Point objects in the specified series in a chart.

注解Remarks

使用索引的索引_所在点的索引号,返回一个指向的对象。点在系列从左至右编号。Points(1)是最左侧的点和Points(Points.Count)为最右侧的点。Use Points ( _Index ), where Index is the point index number, to return a single Point object. Points are numbered from left to right on the series. Points(1) is the leftmost point, and Points(Points.Count) is the rightmost point.

示例Example

请注意 尽管下面的代码适用于 Microsoft Word 中,您可以随时修改将其应用到 PowerPoint。Note Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

使用方法返回集合。下面的示例为活动文档中第一个图表将数据标签添加到一个数据系列中的最后一个点。Use the Points method to return the Points collection. The following example adds a data label to the last point in series one for the first chart in the active document.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Points

            .Item(.Count).ApplyDataLabels Type:=xlShowValue

        End With

    End If

End With

请注意 尽管下面的代码适用于 Microsoft Word 中,您可以随时修改将其应用到 PowerPoint。Note Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

以下示例为活动文档中第一个图表上第一个系列中的第三个数据点设置标记样式。指定的系列必须是二维折线图、散点图或雷达图中的系列。The following example sets the marker style for the third point in series one for the first chart in the active document. The specified series must be a 2-D line, scatter, or radar series.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Points(3).MarkerStyle = xlDiamond

    End If

End With

另请参阅See also

概念Concepts

PowerPoint 对象模型引用PowerPoint Object Model Reference

© 2018 Microsoft