Back to Devexpress

XRChart.PivotChartingCustomizeLegend Event

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrchart-33c521bc.md

latest3.7 KB
Original Source

XRChart.PivotChartingCustomizeLegend Event

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

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

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 an XRPivotGrid is assigned to the chart’s XRChart.DataSource property, and the PivotGridDataSourceOptions.AutoLayoutSettingsEnabled property is enabled, 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 (with the CustomizeLegendEventArgs.MaxHorizontalPercentage and CustomizeLegendEventArgs.MaxVerticalPercentage properties). To access the legend, use the CustomizeLegendEventArgs.Legend property.

To learn more, see Pivot Charting (Integration with a Pivot Grid Control).

See Also

AutoLayoutSettingsEnabled

Integrate the WinForms Chart with the Pivot Grid Control

XRChart Class

XRChart Members

DevExpress.XtraReports.UI Namespace