DataLabels 方法

此頁沒有內(nèi)容條目
內(nèi)容

返回代表單個(gè)數(shù)據(jù)標(biāo)簽或所有數(shù)據(jù)系列的數(shù)據(jù)標(biāo)簽集合的某個(gè)對(duì)象。

expression.DataLabels(Index)

expression   必需。該表達(dá)式返回“應(yīng)用于”列表中的對(duì)象之一。

Index   Variant 類型,可選。數(shù)據(jù)標(biāo)簽的編號(hào)。

示例

本示例使第一個(gè)數(shù)據(jù)系列的數(shù)據(jù)標(biāo)簽顯示其圖例標(biāo)示。本示例運(yùn)行時(shí),假定這些數(shù)據(jù)標(biāo)簽的數(shù)值可見。

With myChart.SeriesCollection(1)

    .HasDataLabels = True

    With .DataLabels

        .ShowLegendKey = True

        .Type = xlValue

    End With

End With