Skip to main content
A newer version of this page is available. .

ScaleBreakCollection.Add(ScaleBreak) Method

Appends the specified ScaleBreak object to the current collection.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v18.2.dll

Declaration

public int Add(
    ScaleBreak scaleBreak
)

Parameters

Name Type Description
scaleBreak ScaleBreak

A ScaleBreak object to append to the collection.

Returns

Type Description
Int32

An integer value indicating the position at which the new element was inserted.

Remarks

This method adds a ScaleBreak object to the end of the collection.

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;

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Add(ScaleBreak) method.

Note

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