03-28-2016 06:25 AM
I work with MS2015 and WPH Graph. If I do horizontal zoom and then I want to do vertical zoom, the vertical zoom resets the zoom to be ZoomToFit.
For example the x axis range is between 0-10 and the y axis range is between 10 - 20, I want to do horizontal zoom to see only range 3-4 and in that range to do zoom on y axis to see range 12-13, how can I do this?
Solved! Go to Solution.
03-28-2016 07:57 AM
I do all the zooms via GraphInteractionPalette
03-28-2016 10:40 AM
Based on the described behavior, I take it you are using either FitVisibleLoosely
or FitVisibleExactly
for one or both adjusters on your axes? When you do a pan or zoom in a single dimension (horizontal or vertical), the WPF and Windows Forms graphs will automatically adjust the other dimension to match the new visible range when using "fit visible".
To avoid this behavior, you will need to change your adjusters to a non-"fit visible" value while you are interacting with the graph. You can do this manually (e.g. if interaction happens only after data acquisition has completed), or automatically (e.g. using a converter bound to DefaultInteraction
to change the Adjuster
).
03-29-2016 03:35 AM
I indeed used "FitVisibleExactly" adjuster for x axis.
I changed it to "FitExactly" and it fixed the behavior.
The truth is that I don't really see a difference now in the way that the graph displays the samples (comparing to "FitVisibleExactly") , what do I miss here?
03-29-2016 09:41 AM
The only difference between the two categories of adjusters is that "fit" always looks at all the data, while "fit visible" will look only at the data in the range of the other axis.
For example, for a simple data set "0, 1, 2, 3, 4, 5" (with a data range of [0,5] on both axes):
The "Fit Adjuster Comparison" example installed with Measurement Studio also demonstrates this difference.
03-29-2016 11:21 AM
Thanks Paul for your help!