Microsoft Chart Control for .NET Framework supports a large number of events, giving developers many different ways to customize their charts. 

All events are made available by the Chart object. The name of the event usually indicates the nature of the event and the object to which it applies, such as the AxisScrollBarClicked event.

PrePaint and PostPaint

There are two special events that allow for custom painting: PrePaint and PostPaint. The PrePaint event is triggered just before the Chart object is painted, and the PostPaint event is triggered just after the chart is painted. Use these events for custom painting. The figure below demonstrates using PostPaint to place an image in the chart picture.


Customize

Another important event is the Customize event, which has two unique characteristics:

  1. All chart data is available, such including series and data points. This is especially useful if you are using data binding, since you can exame the data adjust the chart before the chart is painted.
  2. All chart properties have been set to explicit values, including the properties that have been set to "Auto". You can examine these values and modify and modify them before the chart is painted.

The following lists chart elements that have one or more associated events:

Chart Element Related Events
Chart PrePaint, PostPaint, Customize, CustomizeMapAreas
Legend CustomizeLegend
multiple elements Click