LeaderLines 对象 (Word)LeaderLines object (Word)

代表图表的引导线。Represents leader lines on a chart. 引导线将数据标签连接到数据点。Leader lines connect data labels to data points.

说明Remarks

此对象不是一个集合;没有表示单个引导线的对象。This object is not a collection; there is no object that represents a single leader line.

此对象只适用于饼图。This object applies only to pie charts.

示例Example

LeaderLines 属性用于返回LeaderLines对象。Use the LeaderLines property to return the LeaderLines object. 下面的示例向活动文档中第一个图表上第一个数据系列添加数据标签和蓝色引导线。The following example adds data labels and blue leader lines to series one on the first chart in the active document. 如果看不到引导线,则此示例代码将失败。If no leader lines are visible, this example code will fail. 在这种情况下,可从饼图中手动拖出其中一个数据标签以便显示引导线。In this situation, you can manually drag one of the data labels away from the pie chart to make a leader line show up.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart.SeriesCollection(1) 
 .HasDataLabels = True 
 .DataLabels.Position = xlLabelPositionBestFit 
 .HasLeaderLines = True 
 .LeaderLines.Border.ColorIndex = 5 
 End With 
 End If 
End With

另请参阅See also

Word 对象模型引用Word Object Model Reference