Export (0) Print
Expand All

Chart.Customize Event

.NET Framework 4.6 and 4.5

Occurs just before the chart image is drawn. All chart data is available and all chart properties have been set.

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

public event EventHandler Customize

This event has two unique features:

  • All chart data is available; that is, the series and their data points are populated. This is especially useful if data-binding is being used, because the data can be examined and the chart can be adjusted just prior to being drawn.

  • All chart properties have been set, including those properties that have been set to "Auto". In other words, "Auto" properties now store the automatically calculated values, and can be examined and modified prior to the chart being drawn. Examples are the Minimum and Maximum properties of the Axis class.

Use this event to modify or customize the chart image before it is drawn.

When changes are made to a chart area, such as to the axis scale, the chart area properties must be recalculated in order to render the chart correctly. To recalculate the chart, call the RecalculateAxesScale method after making modifications.

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft