Pre loader

Realtime Ticking Stockchart MVVM Exacmple

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 believe there’s a typo in the code tab for the view model:
We have:
if (XVisibleRange.Max > ds0.Count)
{
var existingRange = _xVisibleRange;
var newRange = new IndexRange(existingRange.Min + 1, existingRange.Max + 1);
XVisibleRange = newRange;
}
but clearly the min value should not change (at least no here) since as result the real time values will not be in the visisble region. It might be an idea to update the sample code.
cheers
Claes

  • You must to post comments
0
0

Hi Claes,

What this code does is advance the VisibleRange (scroll one point to the left) when the latest price is inside the viewport. This has the effect of keeping the ticking stock chart always in view, if it is in view, but when you scroll back in time so the latest price is out of the viewport, it will not advance.

Is this not what you expected?

Best regards,
Andrew

  • 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