You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also had the same problem. I debugged the ExampleBrowser running on iOS and I tracked the problem down to 2 issues with OxyPlot.Core.
Number 1
The constructor for PlotController installs 2 TouchDown bindings, the first is for handling Pan/Zoom and the second is for handling a tracker. Well, in the constructor, you will see multiple items being bound to the same event, however, those allow multiple bindings per event as long as the modifier is different. A modifier would be like which keyboard key or which mouse button. However, touch is touch with no modifier. This means the second binding for TouchDown (for the tracker) OVERWRITES the first binding for TouchDown (panning/zooming). So the first fix is to comment out the second tracker binding.
Number 2
Even after fixing problem number 1 above, panning/zooming on touch devices still doesn't work. This is because the Tracker touch manipulator extends the touch manipulator but the touch manipulator does NOT default the panning/zooming support to true. So the fix is to add a line to the constructor of TouchManipulator to set SetHandledForPanOrZoom = true;
Hello! Is there an update on this issue? I'm using OxyPlot.Core and OxyPlot.Xamarin.Android NuGets which are re-installed on 5/10/2018. I can't zoom the graphs using code. Touch zoom works properly.
Hello
Is there an update or an ETA on this topic? I am using Oxyplot for Xamarin.Forms and not being able to zoom or pan the charts is unfortunately a breaking issue for me.
I don´t know the status on this issue. We depend on contributions to get this fixed!
(I recommend to include oxyplot-xamarin as source code (e.g. by using git submodule), not as nuget package, to make sure you get the latest version)
I work with WPF, touch and pan was not working out of the box, with a little research I found that SnapTrackTouch is causing this issue. Binding to my own controller and unbinding all TouchDown commands from it, fixed touch input. I just had to bind PanZoomByTouch again:
var plotcontroller = new PlotController();
plotcontroller.UnbindTouchDown();
plotcontroller.BindTouchDown(PlotCommands.PanZoomByTouch);
In fact, both SnapTrackTouch and PanZoomByTouch work fine separately but not together. Snap track in my opinion could be disabled by default, it's not useful on a touch screen, the point tooltip is only visible for a split second. Or am I wrong and it can be used for other things as well?
Activity
scastria commentedon Jan 21, 2018
I also had the same problem. I debugged the ExampleBrowser running on iOS and I tracked the problem down to 2 issues with OxyPlot.Core.
Number 1
The constructor for PlotController installs 2 TouchDown bindings, the first is for handling Pan/Zoom and the second is for handling a tracker. Well, in the constructor, you will see multiple items being bound to the same event, however, those allow multiple bindings per event as long as the modifier is different. A modifier would be like which keyboard key or which mouse button. However, touch is touch with no modifier. This means the second binding for TouchDown (for the tracker) OVERWRITES the first binding for TouchDown (panning/zooming). So the first fix is to comment out the second tracker binding.
Number 2
Even after fixing problem number 1 above, panning/zooming on touch devices still doesn't work. This is because the Tracker touch manipulator extends the touch manipulator but the touch manipulator does NOT default the panning/zooming support to true. So the fix is to add a line to the constructor of TouchManipulator to set SetHandledForPanOrZoom = true;
rapmue commentedon May 8, 2018
@scastria I came across the same issues with Windows.Forms. But I also noticed, that Number 2 is fixed with oxyplot/oxyplot#1184
Currently, I'm working on a fix for Number 1. As soon as I got my pull request ready, I'll attach it here.
Anax7 commentedon Oct 8, 2018
Hello! Is there an update on this issue? I'm using OxyPlot.Core and OxyPlot.Xamarin.Android NuGets which are re-installed on 5/10/2018. I can't zoom the graphs using code. Touch zoom works properly.
[-]Pan and Zoom not work[/-][+]Pan and Zoom not working[/+]Setomba commentedon Jan 15, 2020
Hello
Is there an update or an ETA on this topic? I am using Oxyplot for Xamarin.Forms and not being able to zoom or pan the charts is unfortunately a breaking issue for me.
objorke commentedon Feb 26, 2020
I don´t know the status on this issue. We depend on contributions to get this fixed!
(I recommend to include oxyplot-xamarin as source code (e.g. by using git submodule), not as nuget package, to make sure you get the latest version)
Enduteri commentedon Nov 2, 2023
I work with WPF, touch and pan was not working out of the box, with a little research I found that SnapTrackTouch is causing this issue. Binding to my own controller and unbinding all TouchDown commands from it, fixed touch input. I just had to bind PanZoomByTouch again:
In fact, both SnapTrackTouch and PanZoomByTouch work fine separately but not together. Snap track in my opinion could be disabled by default, it's not useful on a touch screen, the point tooltip is only visible for a split second. Or am I wrong and it can be used for other things as well?