DxPolarChart<T>.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 |
|
Remarks
DxPolarChart
automatically sorts the argument axis numerically or chronologically. The sort direction can be specified by the DxPolarChartArgumentAxis.Inverted property.
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 counterclockwise.
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 (clockwise or counterclockwise).
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.
<DxPolarChart Data="DataSource" Width="350px"
Sorted="true">
<DxChartTitle Text="Sorted="true"" />
<DxChartLegend Visible="false" />
<DxPolarChartLineSeries ArgumentField="@((SaleInfo s)=>s.Date)"
ValueField="@((SaleInfo s)=>s.Amount)" />
<DxPolarChartArgumentAxis>
<DxPolarChartAxisLabel Format="@ChartElementFormat.FromLdmlString("MMM")" />
</DxPolarChartArgumentAxis>
</DxPolarChart>
@code {
List<SaleInfo> DataSource { get; set; } = new List<SaleInfo>();
protected override void OnInitialized() {
DataSource = Data.Sales.GetMonthlySales();
}
}
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.