SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I am using Scichart android ,for Linking Chart Modifiers of Multiple charts I use these lines of code as shown below but it will not synchronize charts on X axis properley sometimes what is the reason ?
Is there is any other method to do that?
ModifierGroup chartModifiers2 = sciChartBuilder.newModifierGroup()
// Setting MotionEventsGroup
Thanks for your question. Usually charts can go out of sync because they are rendered in separate threads and as result one chart can be presented on screen sooner than other, but in the end the should end up in the same position because modifiers in same group receive same events and use same code base so if starting conditions are the same they should end in same state after invoking modifiers. ‘
The only case when few charts in same group can go out of sync if they are different – have different sizes ( this may lead to different scrolling distance because of different amount of data per pixel ) or different modifiers ( e.g. if one chart has modifier which changes VisibleRange and other don’t – this can lead to different end states of chart ).
BTW if you want to synchronize charts to show same VisibleRange on several charts then you can create and assign same range instance for axes which should be synchronized like we do in our Sync multiple charts example. In this case you don’t need to use event groups because if modifier changes VisibleRange in one chart this value will be propagated to another chart.
DoubleRange sharedXRange = new DoubleRange(0d, 1d); final IAxis xAxis1 = sciChartBuilder.newNumericAxis().withVisibleRange(sharedXRange).build(); final IAxis xAxis2 = sciChartBuilder.newNumericAxis().withVisibleRange(sharedXRange).build();
Please login first to submit.