Chart.CustomizeLegend Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs just before the chart legend is drawn. Use this event to customize the chart legend items.
public:
event EventHandler<System::Web::UI::DataVisualization::Charting::CustomizeLegendEventArgs ^> ^ CustomizeLegend;
public event EventHandler<System.Web.UI.DataVisualization.Charting.CustomizeLegendEventArgs> CustomizeLegend;
member this.CustomizeLegend : EventHandler<System.Web.UI.DataVisualization.Charting.CustomizeLegendEventArgs>
Public Custom Event CustomizeLegend As EventHandler(Of CustomizeLegendEventArgs)
Event Type
Remarks
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.