Export (0) Print
Expand All

CustomizeLegendEventArgs.LegendItems Property

Used to remove, modify or change the order of both custom and default legend items in the CustomizeLegend event. Can also be used to add custom legend items.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public LegendItemsCollection LegendItems { get; }

The LegendItems property allows you to delete or modify both default and custom legend items in the CustomizeLegend event, and to add custom legend items. The order of legend items can also be changed.

NoteNote

The SeriesPointIndex and [LegendItem.SeriesPointIndex] properties can be used to determine the data element that is associated with a default legend item. These properties will return zero-length strings for custom legend items, because custom items are not associated with chart data.

This property enables you to determine which Legend the event was raised for, which enables you to customize an individual [Legend].

.NET Framework

Supported in: 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft