Pre loader

How to move renderable series from single-pane to multi pane during runtime?


I wonder whether it is possible to populate a single pane with multiple renderable series and then during runtime to provide the ability to select specific series (either by drag-and-drop) or by highlighting on the legend or otherwise) and allocate them to a segregated pane that is then created during run-time.

For example, I start out with a single pane and 3 data series and then choose the 2nd series and move it to a second pane that is created during run-time and that shares the same x-Axis as the original pane. The same could be done with the 3rd series. Optimally I would be able to move the data series between the panes and create any chosen number panes (up to the number data series, meaning empty panes would be closed/disposed).

Any ideas how to potentially accomplish such? I am happy with code-behind only if a pure xaml solution turns out to be too complex.

  • You must to post comments
Best Answer

Hi there,

There is nothing out of the box that will facilitate Drag & Drop, however, to move a series from one SciChartSurface to another, you simply have to remove the series from the ScIChartSurface.RenderableSeries collection and add it to another SciChartSurface.RenderableSeries collection.

Make sure when you move it, you update the RenderableSeries.XAxisId, YAxisId (if you are using multiple axis and/or non-default axis ids). By default for single X,Y axis scenarios, updating the XAxisId, YAxisId is not necessary.

Selection of DataSeries may be performed in a MouseDown event or custom modifier. At a basic level you only need to set RenderableSeries.IsSelected and have a RenderableSeries.SelectedSeriesStyle in order to provide a visual cue that a series is selected. After that you will need to interop with the WPF Drag & Drop mechanism.

Finally, there are many mechanisms in WPF to facilitate drag & drop.

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies