WholeRange.AlwaysShowZeroLevel Property
Gets or sets the value that indicates whether to show an axis zero level.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.1.dll
NuGet Package: DevExpress.Charts
Declaration
[NonTestableProperty]
[TypeConverter(typeof(BooleanTypeConverter))]
[XtraSerializableProperty]
public bool AlwaysShowZeroLevel { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if zero values should be displayed; otherwise false. |
Remarks
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 |
---|---|
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.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AlwaysShowZeroLevel property.
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.