This documentation is archived and is not being maintained.

DataManipulator::Sort Method (PointSortOrder, String, String)

Sorts the data points of one or more series in the specified order. The sort can be based on any available data point value.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public:
void Sort(
	PointSortOrder pointSortOrder, 
	String^ sortBy, 
	String^ seriesName
)

Parameters

pointSortOrder
Type: System.Web.UI.DataVisualization.Charting::PointSortOrder
A PointSortOrder enumeration value that determines if the sort is ascending or descending.
sortBy
Type: System::String
A string value that represents the data point values to be sorted. Possible values are: "X", "Y", "Y2", "Y3", "AxisLabel", and so forth.
seriesName
Type: System::String
A comma-separated list of names of the Series to be sorted.

This method performs an ascending or descending sort on data points in a series, and is based on the value that is set in the sortBy parameter such as "X", "AxisLabel", "Y", "Y1", and so forth.

Note that if multiple series are sorted, the series must be aligned, otherwise an exception will be thrown.

Important noteImportant

All series will be sorted using the specified Y-value from the FIRST listed series; that is, all data points, regardless of the series they belong to, are sorted based on the first series.

To sort points using a custom sort routine, use a different definition of this overloaded method.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: