Hi,
I am making a chart where several PointLineSeries are displayed. Is there any property that can be used to decide in which order the series are displayed, i.e. which series is displayed in front? For example, in the attached image the gray data is in front of the blue data, how can I switch the order?
Thank you,
Algernon
Order in which PointLineSeries are displayed
Moderator: Queue Moderators
-
- Posts: 141
- Joined: Wed Mar 27, 2019 1:05 pm
Re: Order in which PointLineSeries are displayed
Hello,
There currently isn't a property which controls the order of PointLineSeries. Instead, they are drawn in the order they are added to chart. In other words the first series (chart.ViewXY.PointLineSeries[0]) is always drawn before the second one (chart.ViewXY.PointLineSeries[1]). Therefore, if you want to show the blue data in front of the grey one, add the grey series first and then the blue one.
If you need to change the drawing order while the application is running, it can be done by removing and adding back a series. For example:
Hope this helps.
Best regards,
Lasse
There currently isn't a property which controls the order of PointLineSeries. Instead, they are drawn in the order they are added to chart. In other words the first series (chart.ViewXY.PointLineSeries[0]) is always drawn before the second one (chart.ViewXY.PointLineSeries[1]). Therefore, if you want to show the blue data in front of the grey one, add the grey series first and then the blue one.
If you need to change the drawing order while the application is running, it can be done by removing and adding back a series. For example:
Code: Select all
_chart.BeginUpdate();
PointLineSeries pls = _chart.ViewXY.PointLineSeries[0]; // Get the first series
_chart.ViewXY.PointLineSeries.Remove(pls); // Remove the first series from the list
_chart.ViewXY.PointLineSeries.Add(pls); // Add the same series to the end of the list
_chart.EndUpdate();
Best regards,
Lasse
Re: Order in which PointLineSeries are displayed
Great, thank you.
Best regards,
Algernon
Best regards,
Algernon