How to Prevent Zoom or Pan on Just One Axis
Posted by Andrew BT on 26 March 2014 11:20 AM
You have a multi axis chart and you are using the RubberBandXyZoomModifier or ZoomPanModifier or MouseWheelModifier. You want to zoom and pan the chart but you want just one axis to stay fixed (not zoom along with the others).
Workaround 1, use VisibleRangechanged
Subscribe to VisibleRangeChanged of the hidden axis and on change, always set it back to the fixed range you want, e.g.
var axis = new NumericAxis(); var range = new DoubleRange(0, 1); axis.VisibleRangeChanged += (s,e) => axis.VisibleRange = range;
Workaround 2, use ViewportManager to override Axis Ranges
If that doesn't work, take a look at our ViewportManager feature, which allows you to go into the scichart core and override the AutoRange and range setting of any axis:
There are examples of use here: