ScaleBreakCollection Class

Represents a collection that stores the manually created scale breaks of a particular axis.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

public class ScaleBreakCollection :
    ChartElementNamedCollection,
    IEnumerable<IScaleBreak>,
    IEnumerable
Public Class ScaleBreakCollection
    Inherits ChartElementNamedCollection
    Implements IEnumerable(Of IScaleBreak),
               IEnumerable

Related API Members

The following members accept/return ScaleBreakCollection objects:

Remarks

Each axis (in particular, an axis of the AxisX or AxisY type) can hold a collection of scale breaks which can be accessed via the Axis.ScaleBreaks property, and is represented by the ScaleBreakCollection class. The properties and methods exposed by the ScaleBreakCollection class can be used to perform common collection operations such as adding new or deleting existing items. Each collection item is represented by a ScaleBreak object. Individual scale breaks can be accessed either using indexer notation or by their names, using specific methods of the collection.

At design time, you can use the Scale Break Collection Editor, to manage the collection of scale breaks.

ScaleBreak_1

Note that the ScaleBreakCollection class represents the collection of the manually created scale breaks only, meaning that automatic scale breaks (although they can accompany the manual scale breaks along the same axis) do not present in this collection.

For more information, refer to Scale Breaks.

Examples

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;
See Also