Dundas Chart for Windows Forms
Sort(PointsSortOrder,Series) Method
See Also  Example Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > DataManipulator Class > Sort Method : Sort(PointsSortOrder,Series) Method


order
A PointsSortOrder enumeration value that determines if the sort is ascending or descending.
Sorting order.
series
The Series object to be sorted.
Series to sort.

Performs a sort on a series' data points using the specified order. The sort is based on the first Y-value of data points.


Sort series data points in specified order.

Syntax

Visual Basic (Declaration)  
Public Overloads Sub Sort( _
   ByVal order As PointsSortOrder, _
   ByVal series As Series _
) 
Visual Basic (Usage) Copy Code
Dim instance As DataManipulator
Dim order As PointsSortOrder
Dim series As Series
 
instance.Sort(order, series)
C#  
public void Sort( 
   PointsSortOrder order,
   Series series
)

Parameters

order
A PointsSortOrder enumeration value that determines if the sort is ascending or descending.
Sorting order.
series
The Series object to be sorted.
Series to sort.

Example

Perform an ascending sort on a series named "Series1" before data is displayed by the chart.
Visual Basic Copy Code
Imports Dundas.Charting.WinControl
...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Chart1.DataManipulator.Sort(PointsSortOrder.Ascending, Chart1.Series("Series1"))
End Sub

Remarks

This method performs an ascending or descending sort on a series' data points, and is based on the first Y-value of the data points.

To sort points: based on their X-values (or other Y-values); using a custom sort routine; or for more than one series per function call use another definition of this overloaded method.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2009 All Rights Reserved.