Skip to main content
A newer version of this page is available. .
All docs
V23.1
.NET Framework 4.5.2+

DataLabelCollection.HiddenLabels Property

Returns the collection of hidden labels.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v23.1.Core.dll

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