corelibraries-devexpress-dot-xtracharts-dot-barserieslabel.md
Gets or sets a value indicating whether to show series labels if a bar’s height is zero.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public bool ShowForZeroValues { get; set; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property ShowForZeroValues As Boolean
| Type | Description |
|---|---|
| Boolean |
true to show labels of zero-height bars; otherwise, false.
|
Use the ShowForZeroValues property to control whether you want the series labels to be visible only for visible bars, or you need to additionally show labels for bars with a zero height, which are actually invisible on a chart. This may be required to make it easier to understand whether there is a bar or not.
The following images demonstrate the ShowForZeroValues property in action.
| ShowForZeroValues = true | ShowForZeroValues = false |
|---|---|
For more information, refer to Series Point Labels and Empty Points Representation.
This example demonstrates the capability to show or hide series labels for empty series points of a Bar series.
((BarSeriesLabel)series1.Label).ShowForZeroValues = true;
CType(series1.Label, BarSeriesLabel).ShowForZeroValues = True
See Also