This event fires just prior to a chart element being drawn.
Fires after the chart element backround was drawn. This event is fired for elements like: ChartPicture, ChartArea and Legend
Visual Basic (Declaration) | |
---|---|
Public Event PrePaint() As PaintEventHandler |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public event PaintEventHandler PrePaint() |
The event handler receives an argument of type ChartPaintEventArgs containing data related to this event. The following ChartPaintEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Chart |
Gets the root Chart object. Chart root object. |
ChartGraphics |
Gets a ChartGraphics object. Chart graphics object. |
Position |
Gets an ElementPosition object. Chart element position in relative coordinates. |
Visual Basic | Copy Code |
---|---|
If Typeof Sender Is Dundas.Charting.WebControl.ChartArea Then |
This event fires just prior to a chart element being drawn, and is raised once for the chart image, and one time for each ChartArea, Legend, Series and DataPoint objects that exist within the chart image (note that this event is not raised for Series and DataPoint objects for 3D charts).
To test what object the event was raised for use the following along with the code snippet above: ChartPicture, ChartArea, Legend, Series, and DataPoint (the sender object allows the developer to determine what chart element has raised this event).
To see how a chart painting event is implemented see the Custom Drawing Using the Painting Events topic.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family