Skip to content
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

OxyPlot.Xamarin.Forms v1.0.0 Zoom and pan only work in debug #146

Open
drormekorot opened this issue Jun 1, 2023 · 8 comments
Open

OxyPlot.Xamarin.Forms v1.0.0 Zoom and pan only work in debug #146

drormekorot opened this issue Jun 1, 2023 · 8 comments
Labels

Comments

@drormekorot
Copy link

drormekorot commented Jun 1, 2023

I'm using OxyPlot.Xamarin.Forms v1.0.0 via NuGet.

I'm displaying a linear graph and it works great along with zoom and pan, as long as I am in debug.
As soon as I switch to release, the graph appears but both zoom and pan do not respond.

This occurs only on Android, on iOS zoom and pan work in release.

My guess is that PlotController is being dropped by the linker, since I did have some issues with it in the past with db classes.
Is there anything that should be added to OnCreate other than OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init(); to force the linker to keep all of OxyPlot's source code?

@janusw
Copy link
Member

janusw commented Jun 1, 2023

I'm using OxyPlot.Xamarin.Forms v1.0.0 via NuGet.

Note that 1.0.0 is 6 years old by now. I don't think we'll fix any bugs for that version any more. Sorry!

Is there any reason why you can't use version 2.0.0 or 2.1.0? If not, please try 2.1.0, which is the latest released version, and tell us if the problem also exists there.

@drormekorot
Copy link
Author

Interestingly enough, I did start the development with 2.1.0, but zoom and pan do not respond at all on the latest version.
Both in debug and release.

I found https://stackoverflow.com/questions/61436606/oxyplot-xamarin-forms-pinch-zoom-and-panning-not-working-for-linear-series that suggested using v1.0.0, so that is why I reverted.

The graph does appear on both versions.

I will be happy to try and solve this issue on 2.1.0, please let me know what other information I can provide.

@janusw
Copy link
Member

janusw commented Jun 1, 2023

Alright, thanks for the feedback. Apparently this is related to issue #62.

If it was working (partly) with 1.0.0, but not with 2.1.0, we can hopefully find out when and how it broke.

As an additional data point, could you maybe check if zoom/pan works with version 2.0.0 on Android?

@janusw janusw added the Android label Jun 1, 2023
@VisualMelon
Copy link

VisualMelon commented Jun 1, 2023

We based the Avalonia touch-input work on Xamarin, so may be some clues in what we had to change for that: oxyplot/oxyplot-avalonia@a067e00 (can't find the discussion around that commit, unfortunately)

If PlotController is lost then all interaction should fail; you could try creating your own PlotController to be bound to the Plot/PlotView - which should ensure it survives the linker - to see if that changes the behaviour at all.

Does the tracker work in 2.1.0?

@drormekorot
Copy link
Author

drormekorot commented Jun 1, 2023

I checked v2.0.0 on Android, graph is displayed but zoom/pan do not respond

The issue is not related to the linker on 2.1.0 as zoom and pan do not respond on debug, which does not use the linker.
I do not see any interaction when interacting with the graph, no tracker, no pinch, no drag.

Please let me know what you require in order to investigate this further, I'll be happy to provide

@drormekorot
Copy link
Author

Just checked with iOS, zoom and pan do not respond on 2.0.0 and 2.1.0.

To summarize:

iOS zoom+pan respond on 1.0.0, both debug and release
Android zoom+pan respond on 1.0.0 debug only.

2.0.0 and 2.1.0, zoom+pan do not respond on iOS and Android

Let me know what you need in order to investigate it.

@drormekorot
Copy link
Author

@janusw any way I can help move this forward?

@IosDeveloperHarsh
Copy link

Any update on this ticket as Zoom and Pan is not working in the 2.1.0 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants