Skip to main content
.NET Framework 4.5.2+

Legend.CustomEntries Property

Provides access to a collection of modified legend entries.

Namespace: DevExpress.Spreadsheet.Charts

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


LegendEntryCollection CustomEntries { get; }

Property Value

Type Description

A LegendEntryCollection object that contains modified legend entries.


When a legend is displayed (Legend.Visible property is true), you can modify the individual legend entries by adding items to the LegendEntryCollection and setting their properties.

The example below demonstrates how to remove the required entries from the chart legend by utilizing the Legend.CustomEntries property.

Dim worksheet As Worksheet = workbook.Worksheets("chartTask3")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet("B2:F6"))
chart.TopLeftCell = worksheet.Cells("H2")
chart.BottomRightCell = worksheet.Cells("N14")

' Exclude entries from the legend.
chart.Legend.CustomEntries.Add(2).Hidden = True
chart.Legend.CustomEntries.Add(3).Hidden = True

The following code snippets (auto-collected from DevExpress Examples) contain references to the CustomEntries property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also