Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxChartRangeSeriesBase<T, TArgument, TValue>.StartValueField Property

Specifies a lambda expression that defines how to obtain the start value for each range series point.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public Expression<Func<T, TValue>> StartValueField { get; set; }

#Property Value

Type Description
Expression<Func<T, TValue>>

A lambda expression that identifies the start value.

#Remarks

Use the DxChart.Data property to bind a chart to an IEnumerable<T> data source. Then, use the following properties to specify fields that contain range series point arguments, start values, and end values.

The following example creates a range bar chart and binds it to data:

Range bar chart

@page "/"
@using System.Drawing

<DxChart Data="@dataPoints">
    <DxChartRangeBarSeries ArgumentField="@((DataPoint i) => i.Argument)"
                           StartValueField="@((DataPoint i) => i.Value1)"
                           EndValueField="@((DataPoint i) => i.Value2)"
                           Name="Range Bars" />
</DxChart>

@code {
    private DataPoint[] dataPoints;
    protected override void OnInitialized() {
        dataPoints = GetDataPoints();
    }
    public class DataPoint {
        public string Argument { get; set; }
        public int Value1 { get; set; }
        public double Value2 { get; set; }
    }
    public DataPoint[] GetDataPoints() {
        DataPoint[] dataPoints = new DataPoint[] {
            new DataPoint() { Argument = "I",   Value1 = 12, Value2 = 21 },
            new DataPoint() { Argument = "II",  Value1 = 13, Value2 = 30 },
            new DataPoint() { Argument = "III", Value1 = 10, Value2 = 24 },
        };
        return dataPoints;
    }
}
See Also