SeriesBase.SeriesPointsSortingKey Property

Gets or sets a value that specifies the values of the data points that the series should be sorted by.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public SeriesPointKey SeriesPointsSortingKey { get; set; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property SeriesPointsSortingKey As SeriesPointKey

Property Value

Type Description
SeriesPointKey

A SeriesPointKey enumeration value.

Remarks

Series points can be sorted based upon either their arguments or data values. Use the SeriesPointsSortingKey property to specify which values of the series' data points should be used to sort the series data.

SeriesPointsSortingKey

The sort order can be specified via the SeriesBase.SeriesPointsSorting property.

NOTE

Since, for some series view types, multiple values for each data point are required, there are four value modes for the SeriesBase.SeriesPointsSortingKey property. So, at runtime, to sort by values points of a series whose view type supports only a single value, choose the SeriesPointKey.Value_1 setting.

Examples

The following properties allow you to sort series points within a series.

Property Description
SeriesBase.SeriesPointsSortingKey Specifies the point sort order.
SeriesBase.SeriesPointsSorting Specifies the value by which series points should be sorted.
using DevExpress.XtraCharts;
using System;
using System.Windows.Forms;

namespace SeriesPointsSorting {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }

        #region #SeriesPointSorting
        private void Form1_Load(object sender, EventArgs e) {
            this.gSPTableAdapter.Fill(this.gspDataSet.GSP);

            SeriesBase seriesTemplate = chart.SeriesTemplate;
            seriesTemplate.SeriesPointsSorting = SortingMode.Ascending;
            seriesTemplate.SeriesPointsSortingKey = SeriesPointKey.Value_1;
        }
        #endregion #SeriesPointSorting
    }
}
See Also