Back to Devexpress

ChartControl.CustomizeXAxisLabels Event

windowsforms-devexpress-dot-xtracharts-dot-chartcontrol-e078e655.md

latest4.6 KB
Original Source

ChartControl.CustomizeXAxisLabels Event

OBSOLETE

The CustomizeXAxisLabels event is obsolete now. Use the PivotChartingCustomizeXAxisLabels event instead.

Occurs after automatic layout settings are applied to the X-axis’ labels.

Namespace : DevExpress.XtraCharts

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

NuGet Package : DevExpress.Win.Charts

Declaration

csharp
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("The CustomizeXAxisLabels event is obsolete now. Use the PivotChartingCustomizeXAxisLabels event instead.")]
public event CustomizeXAxisLabelsEventHandler CustomizeXAxisLabels
vb
<Obsolete("The CustomizeXAxisLabels event is obsolete now. Use the PivotChartingCustomizeXAxisLabels event instead.")>
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Event CustomizeXAxisLabels As CustomizeXAxisLabelsEventHandler

Event Data

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

PropertyDescription
AxisGets the X-axis, whose labels are being customized.
StaggeredSpecifies whether the X-axis labels should be staggered.

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 AxisLabel.Staggered property is defined automatically, and cannot be customized at design time.

Handle the CustomizeXAxisLabels event, to manually adjust this option (via the CustomizeXAxisLabelsEventArgs.Staggered property). To access the X-axis, use the CustomizeXAxisLabelsEventArgs.Axis property.

Note

The X-axis’ labels are staggered, if the axis scale type is Qualitative or DateTime (except for Year ). And, the labels’ direction is made parallel to that of the axis (e.g. the AxisLabel.Angle is 0 if the diagram is not rotated, and the AxisLabel.Angle is 90 when the diagram is rotated). In addition, the labels’ text is affected by the measurement unit specified (e.g. Year , Month , or Day ), and the superfluous labels are made hidden.

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

See Also

AutoLayoutSettingsEnabled

Integrate the WinForms Chart with the Pivot Grid Control

ChartControl Class

ChartControl Members

DevExpress.XtraCharts Namespace