WebChartControl.CustomizeLegend Event
OBSOLETE
The Customize
Occurs before automatic settings are applied to the legend‘s layout properties.
Namespace: DevExpress.XtraCharts.Web
Assembly: DevExpress.XtraCharts.v24.2.Web.dll
NuGet Package: DevExpress.Web.Visualization
#Declaration
[Obsolete("The CustomizeXAxisLabels event is obsolete now. Use the PivotChartingCustomizeXAxisLabels event instead.")]
public event CustomizeLegendEventHandler CustomizeLegend
#Event Data
The CustomizeLegend event's data class is CustomizeLegendEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Legend | Gets the chart’s legend. |
Max |
Specifies the legend‘s maximum horizontal percentage. |
Max |
Specifies the legend‘s maximum vertical percentage. |
#Remarks
When a familiar data source (such as the ASPxPivotGrid) is assigned to the chart’s ASPxDataWebControlBase.DataSourceID property, and the PivotGridDataSourceOptions.AutoLayoutSettingsEnabled property is turned on, the LegendBase.MaxHorizontalPercentage and LegendBase.MaxVerticalPercentage properties are defined automatically, and cannot be customized at design time.
Handle the CustomizeLegend
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).