WholeRange.AlwaysShowZeroLevel Property

Gets or sets the value that indicates whether to show an axis zero level.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v21.2.dll


public bool AlwaysShowZeroLevel { get; set; }

Property Value

Type Description

true if zero values should be displayed; otherwise false.


Use the AlwaysShowZeroLevel property to control whether the zero level should always be visible when the y-axis range is calculated automatically (the Range.Auto property is set to true). The Chart Control calculates a new optimal minimum value for the y-axis when AlwaysShowZeroLevel is disabled. The AlwaysShowZeroLevel property value is ignored if the Range.Auto property is set to false.

Note that you cannot enable the AlwaysShowZeroLevel property for a date-time y-axis.

The following images demonstrate the AlwaysShowZeroLevel property in action:

AlwaysShowZeroLevel = false AlwaysShowZeroLevel = true
AlwaysShowZeroLevel_false AlwaysShowZeroLevel_true
XYDiagram xyDiagram { get { return chartControl1.Diagram as XYDiagram; } }
// ...
xyDiagram.AxisY.WholeRange.AlwaysShowZeroLevel = false;

Refer to Visual Ranges and Whole Ranges for more information about axis ranges.

See Also