corelibraries-devexpress-dot-xtracharts-dot-scalebreakoptions-7013e6b9.md
Gets or sets the color of the axis’ scale breaks.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public Color Color { get; set; }
Public Property Color As Color
| Type | Description |
|---|---|
| Color |
A Color value which specifies the color of the axis’ scale breaks.
|
You can access this nested property as listed below:
| Object Type | Path to Color |
|---|---|
| Axis |
.ScaleBreakOptions .Color
|
Use the Color property, to define the color of scale breaks edges.
Note
The Color property simultaneously affects all the scale breaks available for an axis (both automatic and manual ).
If the Color value is Empty (the default value of the property), the color used to draw scale breaks’ edges is obtained from the current chart appearance.
In addition, to adjust scale breaks appearance, you can use the following properties: ScaleBreakOptions.SizeInPixels and ScaleBreakOptions.Style.
For more information, refer to Scale Breaks.
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;
' 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