I get an error when I scroll my chart. I didn’t change my code. It worked yesterday and it doesn’t today. I just started getting:
VisibleRange was restored to its last valid value. The range class com.scichart.data.model.DoubleRange (Min = 0.0, Max = 307.0) either is not valid or it doesn’t satisfy MinimalZoomConstrain or MaximumZoomConstrain. To provide fallback value please override AxisCore#coerceVisibleRange(IRange) method
I tried to make my MinimalZoomConstrain to zero and MaximumZoomConstrain to maximum. But it didn’t help me. I tried override coerceVisibleRange but I don’t kwon how
My code when chart points received in attachment
- Iliya Mashin asked 2 years ago
- last edited 2 years ago
- You must login to post comments
Hi Iliya,
Well this message is shown when your VisibleRange doesn’t satisfy all constraints set on axis. So probably when you interact with chart ( scroll ) range is set to value that isn’t valid. It’s hard to tell what exactly is wrong with range without running and debugging code ( if you could provide entire code it would be awesome). I would suggest to set breakpoint into coerceVisibleRange() override and check MinimalZoomConstrain/MaximumZoomConstrain values in runtime or you can call isZoomConstrainSatisfied() and ensure that it return true. As for how to override coerceVisibleRange() – it’s purpose is to change range that is passed as parameter and set it to some value that will be valid, then after this method is called we check coerced range once more and if it is still invalid, then we rollback VisibleRange to latest valid value.
Hope this will help you!
Best regards,
Yura
- Yura Khariton answered 2 years ago
-
Unfortunately I can’t. It’s a big commercial project. The code snippet that I’ve provided is reached once when I get all points with the last index
-
I used 0 for minimalZoomConstraint and Int.MAX_VALUE for maximumZoomConstraint but it doesn’t work.
-
It started happening when I had added new time frames. It means intervals between point have changed (I use category date axis). I don’t know how fix it. But the problem is clear
-
Well without code that reproduces this issue there is not much that we can do to help you. Without code to debug we can’t identify the cause of this issue and as result we can’t fix it. I tried to reproduce this issue in one of our examples, but without success. Also I don’t remember that this issue was reported before by other users. So it is probably caused by some edge case which we haven’t encountered yet. Maybe you can try to reproduce it somehow in our demo application or in some small project which contains only part related to usage of SciChart?
-
I could fix it. Changing AutoRange.Always to AutoRange.None for the x axis helped me
- 2 more comments
- You must login to post comments
Please login first to submit.