Skip to main content
All docs
V24.2

DxRangeSelectorChart.NegativesAsZeroes Property

Specifies whether DxRangeSelectorChart treats negative values as zeroes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(false)]
[Parameter]
public bool NegativesAsZeroes { get; set; }

Property Value

Type Default Description
Boolean false

true to display negative values as zeroes; otherwise, false.

Remarks

The Range Selector’s DxRangeSelectorChart component allows you to create series with negative values. When you use stacked series, the chart displays negative values as follows:

Range Selector - Chart Stacked Series

Set the NegativeAsZeroes property to true to display negative values as zeroes. Note that this property values apply to stacked series only.

Range Selector - Negative Values as Zeroes

<DxRangeSelector Width="100%"
                 Data="@Data"
                 ValueChangeMode="RangeSelectorValueChangeMode.OnHandleMove">
    <DxRangeSelectorChart NegativesAsZeroes="true">
        @CreateChartStackedAreaSeries(s => s.Y1)
        @CreateChartStackedAreaSeries(s => s.Y2)
        @CreateChartStackedAreaSeries(s => s.Y3)
    </DxRangeSelectorChart>
    <DxRangeSelectorScale TickInterval="50" />
</DxRangeSelector>

@code {
    protected override void OnInitialized() {
        Data = RangeSelectorPointProvider.GetData();
    }

    private RenderFragment CreateChartAreaSeries(Expression<Func<Point, double>> valueField) =>
        @<DxChartStackedAreaSeries ArgumentField="@(s => s.Arg)"
                                   ValueField="@(valueField)">
        </DxChartStackedAreaSeries>;
}
See Also