Pre loader

VisibleRange Zoom to Fit after changing data

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

Hi there

I have written a stock chart application. As part of that I have a drop down box that allows the selection of the bar timeframe (e.g. 1m , 5m, … 1r, 4h etc). It all works fine. However, if I bring up a chart and then do some zooming and panning AND THEN select a new timeframe, sometimes the data is not initially visible and I have to scroll the chart to find it ! Should I be resetting the visible range in some way?

Thanks

Paul

  • You must to post comments
0
0

Hi Paul,

Sounds like you need to call SciChartSurface.ZoomExtents() after setting new data. The chart won’t auto-range to new data unless you tell it to by using AutoRange.Always.

You can also ZoomExtents in a ViewModel via the ViewportManager feature which is described in the Zoom Including Annotations thread.

Try it – let us know the results.

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