Due to the user often needing to select pre-specified ranges of data to view, I handle the X- and Y-axis VisibleRange manually in code.
I also have both RubberBandXyZoomModifier and MouseWheelZoomModifier enabled.
Instead of using a generic ZoomExtentsModifier (which would show all data), I handle a MouseDoubleClick in code and set the VisibleRanges to the bounds of the user-selected data area’s range.
Now if the RubberBand zoom is used followed by a double-click, the VisibleRange.SetMinMax function gets called with the correct values in my code, but that range does not appear on the chart. However if a MouseWheelZoom is used after the RubberBand zoom, it works fine. Is there something about the RubberBand zoom that is stopping the VisibleRange.SetMinMax function values from being recognized by the chart?
Thanks!
- Matthew Becker asked 8 years ago
- You must login to post comments
Very very simple workaround for you.
Instead of
axis.VisibleRange.SetMinMax(newMin, newMax);
Try this
axis.VisibleRange = new DoubleRange(newMin, newMax);
Does that solve the problem?
If that doesn’t work, do you have any VisibleRange bindings in XAML in your code? If you do, please ensure they are TwoWay bindings.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Thanks Andrew…that worked!
Is there a way to make it so any user zoom can’t move the VisibleRange below the 0-values on the axes? Or is this getting into an area where I should just encapsulate all this functionality into a databound ViewportManager?
Thanks!
- Matthew Becker answered 8 years ago
-
Hi Matthew, I would suggest having a look at our AxisClippingBehaviour at https://www.scichart.com/documentation/v4.x/webframe.html#Axis%20Ranging%20-%20Clipping%20VisibleRange.html That should do it!
-
Got it Thanks! One more… Is there a way to turn off datapoint interpolation for the TooltipModifier? Instead of showing only actual datapoints, tooltips are appearing showing interpolated values between points.
- You must login to post comments
Please login first to submit.