全部显示

Reverse 属性

       

如果该属性的值为 MsoTrue,则反转图表中的节点。MsoTriState,可读写。

expression.Reverse

expression   必需。该表达式返回一个 Diagram 对象。

示例

以下示例创建一个棱锥图表并反转节点,这样原来在棱锥底部的节点变到顶部,而在顶部的节点变到底部。

Sub CreatePyramidDiagram()
    Dim shpDiagram As Shape
    Dim dgnNode As DiagramNode
    Dim intCount As Integer

    'Add pyramid diagram to the current document
    Set shpDiagram = ThisDocument.Shapes.AddDiagram _
        (Type:=msoDiagramPyramid, Left:=10, _
        Top:=15, Width:=400, Height:=475)

    'Add first child node to the diagram
    Set dgnNode = shpDiagram.DiagramNode.Children.AddNode

    'Add three child nodes
    For intCount = 1 To 3
        dgnNode.AddNode
    Next intCount

    With dgnNode.Diagram

        'Enable automatic formatting
        .AutoFormat = msoTrue

        'Reverse the order of the nodes
        .Reverse = msoTrue
    End With
End Sub