DataManipulator.Sort Method (PointSortOrder, String, String)

.NET Framework (current version)

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


Type: System.Web.UI.DataVisualization.Charting.PointSortOrder

A PointSortOrder enumeration value that determines if the sort is ascending or descending.

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.

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.


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
Available since 4.0
Return to top