Represents a scale break on the Y-axis of the chart.
Assembly: System.Web.DataVisualization (in System.Web.DataVisualization.dll)
Gets or sets the style of the break line that will be used to draw the scale break.
Gets or sets the threshold of space on the chart at which scale breaks are drawn.
Gets or sets a flag that indicates whether scale breaks are enabled.
Gets or sets the color of the scale break line.
Gets or sets the style of the scale break line.
Gets or sets the width of the scale break line.
Gets or sets the maximum number of scale breaks to be displayed on the chart.
Gets or sets the spacing gap between the lines of the scale break. The spacing gap is represented as a percentage of the Y-axis.
Gets or sets a StartFromZero enumeration value that indicates whether to start the scale break from zero.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
Scale breaks are intentional discontinuities on the Y-axis that are most often used to redistribute the data points in a series on a chart. This feature improves readability when there are large differences between the high and low values of the data in one series being plotted. Scale breaks are not drawn for differences between data in multiple series.
By default, scale breaks are disabled. You can enable scale breaks on the Y-axis by setting the Enabled property to true. To change the amount of vertical space of the scale break, you can specify a Spacing value. This is calculated as a percentage of the Y-axis scale.
You must have sufficient separation between ranges of data points in a single series to draw a scale break. By default, a scale break can be added only if there is a separation between the data ranges of at least 25% of the chart. If you enable a scale break but it does not appear, even though there is sufficient distance between the data ranges, you can set the CollapsibleSpaceThreshold property to a value less than 25.
Charts support up to five scale breaks per chart; however, the chart can become unreadable if you display more than one scale break. If you have more than two data ranges, consider using a different method for displaying this data. Use the MaxNumberOfBreaks property to reduce the number of scale breaks that can be displayed on the chart.
When a scale break is used, the Y-axis labels may become offset. To disable the label offset, set the IsStaggered property to false.
Scale breaks are not supported under any of the following conditions:
Pie, doughnut, funnel, pyramid, radial or any stacked chart types are used.
Custom intervals for labels, tick marks or grid lines are enabled.
The minimum or maximum value for the axis is set.
Custom labels are used.
A logarithmic Y-axis is specified.
Axis views on the Y-axis, which include scrolling and zooming, are used.
3-D charts are used.
The following code example demonstrates how to enable and customize a scale break after the Chart control has been added to the design surface.
Imports System.Web.UI.DataVisualization.Charting Private Function AddChartData() chart1.Series("Default").Points.Add(New DataPoint(1, 2)) chart1.Series("Default").Points.Add(New DataPoint(2, 4)) chart1.Series("Default").Points.Add(New DataPoint(3, 400000)) chart1.Series("Default").Points.Add(New DataPoint(4, 3)) End Sub Private Function AddScaleBreaks() ' Enable scale breaks. chart1.ChartAreas("Default").AxisY.ScaleBreakStyle.Enabled = True ' Show scale break if more than 25% of the chart is empty space. chart1.ChartAreas("Default").AxisY.ScaleBreakStyle.CollapsibleSpaceThreshold = 25 ' Set the line width of the scale break. chart1.ChartAreas("Default").AxisY.ScaleBreakStyle.LineWidth = 2 ' Set the color of the scale break. chart1.ChartAreas("Default").AxisY.ScaleBreakStyle.LineColor = Color.Red ' If all data points are significantly far from zero, the chart will calculate the scale minimum value. chart1.ChartAreas("Default").AxisY.ScaleBreakStyle.StartFromZero = StartFromZero.Auto ' Set the spacing gap between the lines of the scale break (as a percentage of the Y-axis). chart1.ChartAreas["Default"].AxisY.ScaleBreakStyle.Spacing = 2; End Function
Available since 4.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.