ScaleBreak Class

Represents an individual scale break within the collection.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

public class ScaleBreak :
    ChartElementNamed,
    IScaleBreak,
    IScaleDiapason
Public Class ScaleBreak
    Inherits ChartElementNamed
    Implements IScaleBreak,
               IScaleDiapason

Related API Members

The following members accept/return ScaleBreak objects:

Remarks

With XtraCharts, you have the capability to replace sections of an axis' range with scale breaks, created either manually, automatically, or both.

The ScaleBreak class contains settings that define the functionality of scale breaks that are manually created for a chart control's axis. The created ScaleBreak objects reside within the ScaleBreakCollection class, and can be accessed via the Axis.ScaleBreaks property.

This collection allows you to manipulate its items by adding new or removing existing ScaleBreak objects. A particular ScaleBreak object can be accessed within the collection using either indexer notation, or by its name, using specific methods of the collection (see the ScaleBreakCollection.Item property).

For a scale break to be created, its ScaleBreak.Edge1 and ScaleBreak.Edge2 properties should be defined. These determine the axis values of the range that a scale break should replace.

The options of automatic scale breaks are represented by the AutoScaleBreaks class.

NOTE

Scale breaks created automatically don't present in the ScaleBreakCollection.

The common appearance settings of scale breaks (both manual and automatic) are contained in the ScaleBreakOptions class.

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;

Inheritance

See Also