Skip to main content
All docs
V25.1
  • DxRangeSelectorChart.Sorted Property

    Specifies whether series point connectors follow the visual argument order or original data source order. Applies only to line series.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Property Value

    Type Default Description
    Boolean false

    true to connect series points in argument order; false to draw connectors in their original sequence from the data source.

    Remarks

    DxRangeSelectorChart automatically sorts the argument axis numerically or chronologically.

    Line series connectors follow the original data source order. If you plot unsorted data, the connectors may go backward or intersect. For example, if your dataset lists May 1st before April 18th, the corresponding connector line is plotted from right to left.

    This behavior can be useful for specific scenarios, such as plotting raw experimental data. If it does not match your intentions, set the Sorted property to true. This makes the chart render connectors based on the visual argument order (left-to-right or right-to-left).

    Note

    Setting the Sorted property to true forces the chart control to re-sort incoming data, even if it is already sorted. If your data is already sorted, leave it out or set it to false to improve performance.

    <DxRangeSelector Data="DataSource">
        <DxTitleSettings Text="Sorted=&quot;true&quot;" />
        <DxRangeSelectorChart Sorted="true">
            <DxChartLineSeries ArgumentField="@((SaleInfo s)=>s.Date)"
                               ValueField="@((SaleInfo s)=>s.Amount)" />
        </DxRangeSelectorChart>
    </DxRangeSelector>
    
    @code {
        List<SaleInfo> DataSource { get; set; } = new List<SaleInfo>();
    
        protected override void OnInitialized() {
            DataSource = Data.Sales.GetMonthlySales();
        }
    }
    

    Sorted and unsorted Range Selector charts

    Note the following limitations for the Sorted property:

    • While this property can be used with all chart types, it only affects the appearance of line series.
    • Automatic sorting of series points works only for numeric or date arguments. Line series with string arguments remain unchanged, regardless of this property’s value.
    See Also