Back to Devexpress

ChartControl.PivotChartingCustomizeLegend Event

windowsforms-devexpress-dot-xtracharts-dot-chartcontrol-3944ed2f.md

latest3.5 KB
Original Source

ChartControl.PivotChartingCustomizeLegend Event

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

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.UI.dll

NuGet Package : DevExpress.Win.Charts

Declaration

csharp
public event CustomizeLegendEventHandler PivotChartingCustomizeLegend
vb
Public Event PivotChartingCustomizeLegend As CustomizeLegendEventHandler

Event Data

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

PropertyDescription
LegendGets the chart’s legend.
MaxHorizontalPercentageSpecifies the legend‘s maximum horizontal percentage.
MaxVerticalPercentageSpecifies 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 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 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

ChartControl Class

ChartControl Members

DevExpress.XtraCharts Namespace