Back to Devexpress

ScaleBreak.Edge2 Property

corelibraries-devexpress-dot-xtracharts-dot-scalebreak-dot-edge2.md

latest3.7 KB
Original Source

ScaleBreak.Edge2 Property

Gets or sets the second edge of a scale break.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public object Edge2 { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property Edge2 As Object

Property Value

TypeDescription
Object

A Object that specifies the scale break’s second edge.

|

Remarks

Use the ScaleBreak.Edge1 and Edge2 properties, to define two values along an axis, by which a scale break’s boundaries are determined.

Note

These values should be defined in the measurement units appropriate for the axis scale type.

Note that a scale break is successfully created with no regard to whether its edge1 value is more or less than its edge2 value, and to the sequence in which these properties are defined.

For more information, refer to Scale Breaks.

Example

This example demonstrates how scale breaks can be created within an axis, and customized at runtime.

csharp
// 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;
vb
' Cast your diagram object to an appropriate diagram type,
' to access its axes.
Dim diagram As XYDiagram = CType(chartControl1.Diagram, XYDiagram)

' 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

Scale Breaks

ScaleBreak Class

ScaleBreak Members

DevExpress.XtraCharts Namespace