I have DevExpress ChartControl and by default the Chart is sorted on Y Axis, but I don't want that behavior. I need the ChartControl to show the datasource the way I build it.
The chart is sorted on Y-Axis (3010139, 3010136, 3010129, ...). But, it's not the way my List was sorted, and I want to remove this behavior from my chartcontrol.
I believe you should set either the ChartControl.SeriesSorting property value or the SeriesBase.SeriesPointsSorting property value to DevExpress.XtraCharts.SortingMode.None
.
For more details please refer to Sorting Data help article.
Use the AxisBase.QualitativeScaleComparer property to define a custom axis label order (see the sample code snippet from the How to: Display Qualitative Scale Values Sorted in a Custom Sort Order article).
The main idea is to attach a class instance implementing the System.Collections.IComparer interface to sort axis values.
See also: How to use the IComparable and IComparer interfaces in Visual C# article.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.