HasCategoryName Property

Microsoft Office Web Components Visual Basic

True if every data label for the specified series or chart currently displays its category name or label. The default value is False. Read/write Boolean.

expression.HasCategoryName

expression    Required. An expression that returns a ChDataLabels object.

Remarks

Data label components are always displayed in the following order: [SeriesName] [CategoryName] [Value] [BubbleSize] [Percentage]

Example

This example causes the data labels for the specified series to display their category and series names.

Sub ShowLabels()
    Dim dl

    Set dl = ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection(0)

    ' Display the category names.
    dl.HasCategoryName = True
    
    ' Display the series names.
    dl.HasSeriesName = True
End Sub