ChartControl.CustomizeLegend Event

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

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.UI.dll

Declaration

[Obsolete("The CustomizeResolveOverlappingMode event is obsolete now. Use the PivotChartingCustomizeResolveOverlappingMode event instead.")]
[Browsable(false)]
public event CustomizeLegendEventHandler CustomizeLegend
<Obsolete("The CustomizeResolveOverlappingMode event is obsolete now. Use the PivotChartingCustomizeResolveOverlappingMode event instead.")>
<Browsable(False)>
Public Event CustomizeLegend As CustomizeLegendEventHandler

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.
MaxHorizontalPercentage Specifies the legend's maximum horizontal percentage.
MaxVerticalPercentage Specifies the legend's maximum vertical percentage.

Remarks

When a familiar data source (such as the PivotGridControl) is assigned to the chart's ChartControl.DataSource property, and the ChartControl.AutoLayoutSettingsEnabled property is turned on, the Legend.MaxHorizontalPercentage and Legend.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).

See Also