Axis.ScaleBreaks Property
Provides access to the axis’ collection of scale breaks.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
[XtraChartsLocalizableCategory(XtraChartsCategory.Elements)]
public ScaleBreakCollection ScaleBreaks { get; }
Property Value
Type | Description |
---|---|
ScaleBreakCollection | A ScaleBreakCollection object containing an axis’ scale breaks. |
Remarks
Use the ScaleBreaks property, if you want to get access to a collection of scale breaks that replace a range between any two values along an axis. These values are determined by the ScaleBreak.Edge1 and ScaleBreak.Edge2 properties.
Note that the ScaleBreaks property provides access to the collection of manual scale breaks only. And, though they can co-exist with automatic scale breaks as well, you cannot access the collection of auto-created scale breaks (enabled via the Axis.AutoScaleBreaks property).
To access the appearance options of scale breaks (which are common to both manual and automatic scale breaks), use the Axis.ScaleBreakOptions property.
For more information, refer to Scale Breaks.
Example
This example demonstrates how scale breaks can be created within an axis, and customized at runtime.
// Cast your diagram object to an appropriate diagram type,
// to access its axes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;
// Add scale breaks to the Y-axis collection,
// with their Edge1 and Edge2 properties defined in the constructor.
diagram.AxisY.ScaleBreaks.Add(new ScaleBreak("Scale Break 1", 10, 100));
diagram.AxisY.ScaleBreaks.Add(new ScaleBreak("Scale Break 2", 110, 2000));
// Define the scale breaks' options.
diagram.AxisY.ScaleBreakOptions.Style = ScaleBreakStyle.Ragged;
diagram.AxisY.ScaleBreakOptions.SizeInPixels = 20;
diagram.AxisY.ScaleBreakOptions.Color = Color.Turquoise;