New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View Limit: Improve pan/zoom behavior (4.1 vs 4.0) #1148
Comments
This comment has been minimized.
This comment has been minimized.
swharden
changed the title
Difference between AxisBounds and SetViewLimit in 4.1.x
View Limit: Improve pan/zoom behavior (4.1 vs 4.0)
Aug 4, 2021
swharden
added a commit
that referenced
this issue
Aug 10, 2021
Previously applying axis view limits could result in unexpected zooming in (#1148). Now applying axis boundaries pans axis limits to avoid zooming when limiting.
Thanks for reporting this @at2software! Your description and videos were excellent I was able to recreate the issue with a (failing) test, then correct it. This will be fixed in the next NuGet release 👍🚀 double[] values = DataGen.RandomWalk(new Random(0), 100);
formsPlot1.Plot.AddSignal(values);
formsPlot1.Plot.SetViewLimits(yMin: 0);
|
Great, thanks a lot! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
AxisBounds()
method from v4.0.48 seems to have been replaced bySetViewLimits()
in v4.1.x. However, upon dragging, the new method now automatically scales / zooms. If exaggerated, this might result in an invalid axis in below example.Can the old
AxisBounds()
behaviour be mimicked in v4.1.x?We have this code in v4.0.48
And adapted the last 3 lines to v4.1.16 like this:
In v4.0.48, the plot can be dragged upwards, as long as there is allowed space available, but stops at y=0.
SetViewLimits
from v4.1.16 behaves similarly, but when the y=0 limit is hit, the graph gets scaled vertically (and, if exaggerated, the y-axis seems to be broken or flipped / inverted).Here's a screencap of the behaviours:
2021-07-07_14_05_14_axpt.mp4
The text was updated successfully, but these errors were encountered: