A newer version of this page is available. Switch to the current version.

WebChartControl.PivotChartingCustomizeLegend Event

Occurs before automatic settings are applied to the legend's layout properties.

Namespace: DevExpress.XtraCharts.Web

Assembly: DevExpress.XtraCharts.v18.2.Web.dll


public event CustomizeLegendEventHandler PivotChartingCustomizeLegend
Public Event PivotChartingCustomizeLegend As CustomizeLegendEventHandler

Event Data

The PivotChartingCustomizeLegend event's data class is CustomizeLegendEventArgs. The following properties provide information specific to this event:

Property Description
Legend Gets the chart's legend.
MaxHorizontalPercentage Specifies the legend's maximum horizontal percentage.
MaxVerticalPercentage Specifies the legend's maximum vertical percentage.


When a familiar data source (such as the ASPxPivotGrid) is assigned to the chart's ASPxDataWebControlBase.DataSourceID property, and the WebChartControl.AutoLayoutSettingsEnabled property is turned on, the Legend.MaxHorizontalPercentage and Legend.MaxVerticalPercentage properties are defined automatically, and cannot be customized at design time.

Handle the PivotChartingCustomizeLegend event to manually adjust these options (via the CustomizeLegendEventArgs.MaxHorizontalPercentage and CustomizeLegendEventArgs.MaxVerticalPercentage properties). To access the legend, use the CustomizeLegendEventArgs.Legend property.

For more information, see Pivot Charting (Integration with a Pivot Grid Control).

See Also