public Void Sort()
Remarks
The Sort method re-orders Series points interchanging their position in the Series values lists so they will be displayed in different coordinates. By default, Series are set to sort points in ascending order using their X coordinates. This is accomplished with this code:
TChart1.Series( 0 ).XValues.Order = loAscending
TChart1.Series( 0 ).YValues.Order = loNone
By default, Series draw points using the point ValueIndex, except in some non common situations like having the horizontal axis inverted.
Important Note: Re-Ordering Series points do NOT change point X coordinates. Series points which have no X coordinates are assigned a unique incremental number to determine the point horizontal positions. Automatic Point indexes start at zero. You will need to change every point X coordinate when sorting Series points with automatic X values.
Example
[C#]
The following code re-orders a Series by it's Y values in descending order:
bar1.Add(new int [8]{23,25,30,34,26,18,33,20});
//Note: XValues.FillSequence should not be called when sorting XY points.
bar1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
bar1.YValues.Order = Steema.TeeChart.Styles.ValueListOrder.Descending;
bar1.YValues.Sort();
bar1.XValues.FillSequence();
See Also
ValueList Class | ValueList Members | Steema.TeeChart.Styles Namespace