Class ChartSorting
Configures the sorting option for the chart.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartSorting : ChartSubComponent, ISubcomponentTracker
Examples
This example shows how to sort a chart by the "Y" property in asscending order.
<SfChart @ref=”Chart” DataSource=”Data”>
<ChartSorting PropertyName ="Y" Direction ="SortDirection.Descending"/>
…
</SfChart>
Constructors
ChartSorting()
Declaration
public ChartSorting()
Properties
Direction
Get and set the sorting direction for the chart data. The available direction are,
- Ascending Sort from smallest to largest. For example, from A to Z.
- Descending Sort from largest to smallest. For example, from Z to A.
Declaration
public ListSortDirection Direction { get; set; }
Property Value
Type | Description |
---|---|
ListSortDirection | Sorts the chart in ascending order. |
Remarks
This property is essential for defining the sorting behavior of the chart data.
PropertyName
Gets or sets the property name being used as the sorting criterion.
Declaration
public string PropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the property name for sorting, such as x, y, high, low, open, close, or size fields of the chart data source. The default value is |
Remarks
This property determines the field by which the chart data should be sorted.
Methods
OnInitialized()
Declaration
protected override void OnInitialized()