I am using SciChart for WPF version 1.3.1.1107 with the MVVM pattern.
I have several lines in one chart where the data from for each line covers the same date time range. I’d like to be able to move a line to the front so that I can better see its data. Currently the order in which I add the lines seems to impact the zindex of the lines series.
Is this possible?
- sdemooy asked 12 years ago
- You must login to post comments
Hi Sam,
I’m pretty sure that when a line is selected it goes to the top of the Z-order. Can you verify this? Changing Canvas.ZOrder will have no effect on the lines as they are rendered as bitmaps, and you are correct in saying that the order of series will change the order that they are rendered.
Let me know if you need further assistance with this.
- Andrew Burnett-Thompson answered 12 years ago
-
I am not using your built in selection feature to select a line. I have a custom legend (a grid control) that I use to indicate which line I'd like to move the front. I found that your selection function only worked when I clicked on a point and not the line segment.
-
Hello Sam, you should set IRenderableSeries IsSelected property to True to select series which you choose by your custom legend (when a series is selected it goes to the top of the Z-order). Don't forget to set SelectedSeriesStyle property. Please, let us know if you have any questions. Best regards, Yuriy
-
Related question. I need to control the z-order of series on a chart through code. I also have an external control which I will use to set the order of various series on the chart (eg by drag/drop seriesNames in a grid) I’m using ObservableCollection as the seriesSource to organize render/data series on the SciChartSurface. 1. If I change the order of a seriesViewModel in the collection, will this change the order of the renderableSeries on the surface (and thus its z-order)? 2. If I change the order of a renderableSeries on the surface, is the orderof the seriesViewModel in the collection changed; and importantly 3. If I change the order of a renderableSeries on the surface, does the order of the dataSeries change, or am I left with renderableSeries and dataSeries with different indexes. thanks in advance.
- You must login to post comments
Please login first to submit.