Pre loader

Synchnonize Vertical Slice Dragging across stacked charts

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

I am have a vertical stacked chart setup which shares the same x- axis ranges. I am trying to find a way to add vertical lines in both the charts at once and further I need the vertical lines to be dragged in sync. When one vertical line annotation is dragged, I need the same movement to happen in the other chart as well. I can share a prototype if you want. Please suggest a solution.

Version
SciChart.4.2.2.9777
  • Yuriy Zadereckiy
    Hi Biju, provided that you have two SciChartSurfaces, you can simply have a binding between two annotations. Have you tried binding their X1 coordinates?
  • Biju Pillai
    Thanks Yuriy. Already heading in that direction. But I see some performance issues when there are multiple synchronized lines in the charts. I am using a vertical slice modifier and the dragging of synchronized vertical lines are not as smooth as I would like.
  • You must to post comments
0
0

Hi Biju,

I’d like to see the code to give you some suggestions.

If you have two charts, you need two VerticalSliceModifiers (one in each chart) and two VerticalLines (one in each chart). the VerticalLineAnnotation.X1 should be bound to a common property in a ViewModel.

Performance problems could occur from a number of places, including:

  1. Number of vertical lines. Say you have hundreds of them and have to update them all
  2. Number of charts. Again say you have tens or hundreds of charts
  3. Binding errors. I don’t have your code so I don’t know if binding errors exist, but if they do, they will cause exceptions & slowdown
  4. How you perform the binding, for example RelativeSource FindAncestor bindings are a lot slower than simple Viewmodel TwoWay bindings.

Anyway send us some code and we can look into it! or, you can try profiling it yourself and looking for binding errors. Maybe you will discover something.

Best regards,
Andrew

  • Biju Pillai
    Thanks Andrew, I am using the same approach.One modifier per chart and new vertical lines which binds to the same property. This works and the performance problem I mentioned are while dragging the vertical lines in a synchronized manner. It takes a minor delay for the vertical lines to follow the mouse.It is not that much of a problem. I will investigate further and let you know if this bothers lot.
  • 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