Pre loader

PinchZoomModifier and xAxis with MinimalZoomConstrain

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
0
0

Hi,

I set up my xAxis (DateAxis) with a minimalZoomConstrain = DateInterval.fromMinutes(3.0). And here is my PinchZoomModifier:

val pinchZoomModifier = PinchZoomModifier().apply {
        direction = Direction2D.XDirection
        receiveHandledEvents = true
    }

The chart works great and restricts the zoom to three minutes, but I get this error to the console whenever I zoom in to reach the minimalZoomConstrain:

E/Axis: VisibleRange was restored to its last valid value. The range class com.scichart.data.model.DateRange (Min = Tue Jan 09 01:52:40 GMT+01:00 2020, Max = Tue Jan 09 01:55:40 GMT+01:00 2020) either is not valid or it doesn't satisfy MinimalZoomConstrain or MaximumZoomConstrain. To provide fallback value please override AxisCore#coerceVisibleRange(IRange) method

How can I get rid of this error? Is there a way to tell the PinchZoomModifier that there is a min limit?

Version
3.1.0.4322
  • You must to post comments
Best Answer
0
0

Hi Erika,

We don’t have an API to set separate constraint for zoom depth in PinchZoomModifier. I believe this is how it should work in case of MinimalZoomConstrain and you can just ignore this message for now ( I think I’m going to create a task to remove this message when VisibleRange doesn’t satisfy this constaint) . Also you can create custom axis and override coerceVisibleRange() method like message suggests and adjust VisibleRange so it will satisfy MinimalZoomConstrain.

Best regards,
Yura

  • 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