.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

LegendEntry Interface

A single legend entry in a chart legend.

Namespace: DevExpress.Spreadsheet.Charts

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


public interface LegendEntry
Public Interface LegendEntry


To hide a single legend entry or change its font, add a LegendEntry instance to the Legend.CustomEntries collection at the required LegendEntry.Index and specify the LegendEntry.Hidden and LegendEntry.Font 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
See Also