Pre loader

Errors with synced charts with shared mouse events and shared visible x-axis ranges. Out of sync

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

Answered
1
0

Hello,

I am currently taking a v5 test drive and noticed the following problem that would be a show stopper for me:

When syncing several chats via shared mouse events and shared visible x-Axis range I noticed that when zooming in that the chart axes get out of sync, sometimes significantly by several seconds on a CategoryDateTimeAxis, DateTimeAxis, but also apparently on numeric axes.

The error can easily be replicated when looking at your Example Suite , specifically the “Sync Multi Chart Mouse” sample. When you zoom into the chart you notice that the x-Axes on each chart are not aligned anymore. In this specific example when zooming in so that the minimum on the left side of the screen lies at around value 10 and the maximum at around 55 then moving with the mouse on the top chart to 52.44 shows a value of 52.53 on the lower chart. That is completely out of sync and gets worse on DateTime and Category DateTime axes.

Could anyone (and support) please chime in so I can understand what is going on and whether there is a fix for this or whether this is a bug that has been around for some time and cannot be adjusted within a reasonable amount of time?

I have been pulling my hairs over this and spent hours on different approaches, via ViewPortManager and the updating of shared visible range in both code and xaml. All to no avail and given the example code also exhibits the same issue I doubt it relates to a wrong implementation on my end.

Thanks a lot,
Matt W.

Version
5.1.0.11299
Images
  • Michael Foos
    Hi, i see the same “bug” in my project.
  • You must to post comments
Best Answer
1
0

Hi there,

Two ways you can do this – you can set an explicit Width, or MaxWidth on the Y-Axes, or alternatively you can use the attached property SciChartGroup.VerticalChartGroup which will lock the sizes of Y-Axes to the same width.

Example usage:

<s:SciChartSurface x:Name="chart0" s:SciChartGroup.VerticalChartGroup="myGroup"></s:SciChartSurface>

<s:SciChartSurface x:Name="chart1" s:SciChartGroup.VerticalChartGroup="myGroup"></s:SciChartSurface>

That should work

  • Nazariy Pelyushkevych
    Hello again. I was managed to reproduce this problem in our example [Sync Multi Chart Mouse]. I’ve zoomed in and have got the same results as you’ve got this results http://take.ms/JE6TA The reason that your axes were out of sync was the different Y values on the current YAxes.VisibleRange as you can see on the image: top chart YAxes values = [ -1 ; 1 ] where the bottom one [ -100; 300] – http://take.ms/c1ggohttp://take.ms/fzSz7j that was the cause of that out of sync values. So my solution should work for you.
  • You must to post comments
1
0

its probably due to either rounding, snapping or a 1 pixel difference in size between the two charts.

Do you have a particularly large monitor resolution? Looks like it. Let me know and we can test.

  • bbmat
    Not particularly large, 2560×1600. Could you point us please to some possible solutions? How can we avoid rounding errors? I use a CategoryDateTime axis where there should be no rounding issues (the underlying index range is based on ints or longs if I am not mistaken?). What about the issue of pixel differences? The misalignment unfortunately is not negligible and it defeats the entire purpose of multiple panes that are stacked vertically because it makes comparing visuals very hard when the two charts are not aligned, x-Axis wise.
  • Andrew Burnett-Thompson
    I’ll get the team to look into it, thanks!
  • You must to post comments
Showing 2 results
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