SeriesPointCollection.Swap(SeriesPoint, SeriesPoint) Method
Swaps the two specified series within the series collection.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
NuGet Package: DevExpress.Charts
#Declaration
public void Swap(
SeriesPoint point1,
SeriesPoint point2
)
#Parameters
Name | Type | Description |
---|---|---|
point1 | Series |
A Series |
point2 | Series |
A Series |
#Remarks
Use the Swap method to quickly change the positions of the two specified series points within the series points collection. Note, that the order of the series items within the collection is useful, for instance, when drawing the chart’s data. It specifies the order in which series points are drawn when the ScaleType.Qualitative scale type is applied. First the first series points in the collection are painted, then the second, and so on. Hence, changing the position of the series points within the collection changes the order in which the series points are painted within a chart.
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Swap(SeriesPoint, SeriesPoint) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.