Pre loader

How to control range for Zoom In/Out

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,

I have medical data displaying every 1s with Date as XAxis and ml/hr as YAxis. I want to control the display to let say, 6hr window in the current display by default whereas zoom-in can go to precisely 1hr and not below that and zoom-out reset to 6hr. How can I achieve this?

FYI, my data retention is for 72hrs.

BR,
Praween K.

Version
v2.2.2.2424
  • Praween Kumar
    FYI, my trial license extended for another month for evaluation of this library.
  • You must to post comments
0
0

Hi Praween,

Have you tried to set VisibleRange for your xAxis? This should give you direct control over what should be displayed by chart. If you want to restrict zoom with modifiers you can use our Minimal/MaximumZoomConstrain:

    xAxis.setMinimalZoomConstrain(DateIntervalUtil.fromHours(1));
    xAxis.setMaximumZoomConstrain(DateIntervalUtil.fromHours(6));

Is this suitable for your needs?

Best regards,
Yura

  • You must to post comments
0
0

Hi Yura,

Is it also possible to change these settings runtime based on some widget event, let say, i want to change the max zoom constrain from 6hr -> 12hr. How will I update the graph view with this API refreshxAxis.setMaximumZoomConstrain(DateIntervalUtil.fromHours(12)) ?

BR,
Praween

  • Yura Khariton
    Well this should be easy. Have you tried to place code above into listener implementation (e.g. in OnClickListener or some other listener which provided by View which you use )? Of course you’ll need to pass axis instance into listener.
  • 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