Dundas Chart for ASP.NET
Sort(PointsSortOrder,String,Series) Method
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > DataManipulator Class > Sort Method : Sort(PointsSortOrder,String,Series) Method


order
A PointsSortOrder enumeration value that determines if the sort is ascending or descending.
Sorting order.
sortBy

A string value that represents the data point values to be sorted. Possible values are: "X", "Y", "Y2", "Y3", "AxisLabel", etc. 

Note:  If X-values are of type string, they are stored in the AxisLabel,  this should be specified instead of "X"


Value to sort by.
series
The Series object to be sorted.
Series to sort.

Performs a sort on a series' data points using the specified order. The sort can be based on any available data point value.


Sort series data points in specified order.

Syntax

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

Parameters

order
A PointsSortOrder enumeration value that determines if the sort is ascending or descending.
Sorting order.
sortBy

A string value that represents the data point values to be sorted. Possible values are: "X", "Y", "Y2", "Y3", "AxisLabel", etc. 

Note:  If X-values are of type string, they are stored in the AxisLabel,  this should be specified instead of "X"


Value to sort by.
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. We will assume a bubble chart is being displayed, and will sort the data based on the second Y-value ("Y2").
Visual Basic Copy Code
Imports Dundas.Charting.WebControl
  ...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Chart1.DataManipulator.Sort(PointsSortOrder.Ascending, "Y2", Chart1.Series("Series1"))
End Sub
C# Copy Code
using Dundas.Charting.WebControl;
 ...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
{
   Chart1.DataManipulator.Sort(PointsSortOrder.Ascending,
"Y2", Chart1.Series["Series1"]);
}

Remarks

This method performs an ascending or descending sort on a series' data points, and is based on the value that is set by the sortBy parameter (e.g. "X", "AxisLabel", "Y", "Y1", etc. .

To sort points using a custom sort routine or to sort 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

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.