Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DataLabelCollection.HiddenLabels Property

Returns the collection of hidden labels.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

IEnumerable<int> HiddenLabels { get; }

#Property Value

Type Description
IEnumerable<Int32>

An enumerator that supports iteration over the collection.

#Remarks

You can use the following API to hide individual data labels on a chart:

The following example iterates through the HiddenLabels collection and displays all hidden labels:

// Create a chart and specify its location.
Chart chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet["B2:C8"]);
chart.TopLeftCell = worksheet.Cells["F2"];
chart.BottomRightCell = worksheet.Cells["L15"];

chart.Series[0].UseCustomDataLabels = true;
// Display all data point values.
chart.Series[0].CustomDataLabels.ShowValue = true;
// Hide individual data labels.
chart.Series[0].CustomDataLabels.SetVisibility(0, false);
chart.Series[0].CustomDataLabels.SetVisibility(1, false);

// Iterate through the collection
// and display all hidden labels.
var hiddenLabels = chart.Series[0].CustomDataLabels.HiddenLabels;
foreach (int index in hiddenLabels)
    chart.Series[0].CustomDataLabels.FindByIndex(index).Hidden = false;
See Also