Chart.CustomizeLegend Event

.NET Framework 4.6 and 4.5

Occurs just before the chart legend is drawn. Use this event to customize the chart legend items.

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

member CustomizeLegend : IEvent<EventHandler<CustomizeLegendEventArgs>,

The CustomizeLegend event is primarily used to customize the legend just before it is drawn. Both default and custom legend items can be removed or modified, and custom items can also be added. In addition, the order of legend items can be changed.

The chart image can also be modified before being drawn by using the sender argument.

Note that a default legend item is an item that is created for either a data series or data point, but a custom legend item is not connected in any way to the chart data.

.NET Framework

Supported in: 4.6, 4.5, 4
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft