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

DisplayUnitLabel 对象 (PowerPoint)DisplayUnitLabel Object (PowerPoint)

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

代表指定图表中坐标轴上的单位标志。Represents a unit label on an axis in the specified chart.

注解Remarks

在绘制大数据(例如,上百万或几十亿的大数据)的图表时使用单位标签很有用。在每个刻度线上使用一个单位标签而不直接使用大数据可以使图表更易理解。Unit labels are useful for charting large values (for example, in the millions or billions). You can make the chart more readable by using a single unit label instead of large numbers at each tick mark.

示例Example

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

使用DisplayUnitLabel属性返回的DisplayUnitLabel对象。下面的示例在活动文档中,设置到"百万"的第一个图表中数值轴上显示标签标题,然后本示例将关闭自动字体缩放。Use the DisplayUnitLabel property to return the DisplayUnitLabel object. The following example sets the display label caption to "Millions" on the value axis of the first chart in the active document, and then the example turns off automatic font scaling.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .DisplayUnit = xlMillions

            .HasDisplayUnitLabel = True

            With .DisplayUnitLabel

                .Caption = "Millions"

                .AutoScaleFont = False

            End With

        End With

    End If

End With

另请参阅See also

概念Concepts

PowerPoint 对象模型引用PowerPoint Object Model Reference

© 2018 Microsoft