Skip to main content

AutoScaleBreaks.MaxCount Property

Gets or sets the maximum number of automatic scale breaks.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v22.2.dll

NuGet Package: DevExpress.Charts


public int MaxCount { get; set; }

Property Value

Type Description

An integer value, which specifies the maximum number of automatic scale breaks.


Use the MaxCount property to define the maximum number of automatic scale breaks allowed, when the AutoScaleBreaks.Enabled property is set to true.


Both automatic and manual scale breaks can co-exist along the same axis. The scale breaks calculation is performed in such a way so that if their ranges interfere, scale breaks are merged.

To access the collection of manual scale breaks, use the Axis.ScaleBreaks property.

For more information, refer to Scale Breaks.


Use the following code, to enable automatic scale breaks at runtime.

// Cast your diagram object to an appropriate diagram type,
// to access its axes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;

// Enable automatic scale breaks creation, 
// and define their maximum number.
diagram.AxisY.AutoScaleBreaks.Enabled = true;
diagram.AxisY.AutoScaleBreaks.MaxCount = 5;

// Define the scale breaks' options, which are common
// for both manual and automatic scale breaks.
diagram.AxisY.ScaleBreakOptions.Style = ScaleBreakStyle.Waved;
diagram.AxisY.ScaleBreakOptions.SizeInPixels = 30;
diagram.AxisY.ScaleBreakOptions.Color = Color.Turquoise;

The following code snippets (auto-collected from DevExpress Examples) contain references to the MaxCount property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also