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. |
PropertyName
Gets or sets the property name being used as the sorting criteria.
Declaration
public string PropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String | Specifies property name for the sorting. The default value is |
Remarks
PropertyName property takes x, y, high, low, open, close and size fields of the chart data source.
Methods
OnInitialized()
Declaration
protected override void OnInitialized()