-
Notifications
You must be signed in to change notification settings - Fork 55
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
Feature Request: VictoryZoomContainer #143
Comments
I'm planning to do a migration as well as @agusvazquez , I would love to know about the VictoryZoomController or about any example of implementation with chart-gestures |
any update on this? |
Hey! Will we have this feature in the near future? |
Hey! Any update for this feature? My team really enjoys working with victory-native. But we miss the pinch-zoom and pan gesture 😢 |
+1 for this. It would be good to know if this is planned future work or if there is now some limitation preventing it from being possible. |
No limitations on it being possible. It's just a complex feature that takes some time & thought. With that, I've begun playing around with some implementation ideas but do not have a timeline on when it'd be available. |
Thanks for the reply Keith. Is it possible to share your thoughts and ideas here? I am considering options if I'd like this developed sooner. For now I've got back to using an iFrame wrapping a chartJS, as I find the deprecated victory library which contains the zoomcontainer doesn't seem to work on iOS or android anymore for pan or zoom. |
Hey @keithluchtel! I've also been playing around with this. I have capacity to work on it at the moment, so if you have any thoughts on the implementation, API, etc, I'd be very interested to hear them! 🙂 |
Hey @bcheidemann, thank you very much for putting this together! This is quite different from how I was going about the implementation, but I think yours is a lot simpler. I was working on adding the gesture detection within the What I like about yours is that you're accomplishing the pan/zoom just by updating the domains and having the chart recalculate the paths accordingly. With the current implementation, users would each have the manually add the gesture detection however. I need to think and get some more opinions on ultimately how we want the API to change to accommodate the feature. |
Hey @keithluchtel, thanks for taking a look!
Ultimately, I think it makes sense to use the existing Keeping track of a transform matrix does make a lot of sense, and I had considered something similar myself. However, just thinking out loud here, I was wondering if it makes sense to instead track a "view box" for the chart in its native axes coordinates. The advantages of this approach would be as follows:
I do think letting the chart recalculate paths based on the domain has some advantages (mainly simplicity). However, there's also some limitations I found when playing around with this method. In particular, it links the animations with pan/zoom in a way that leads to an... unconventional pan/zoom experience! (see the video below) Simulator.Screen.Recording.-.iPhone.15.Plus.-.2024-10-18.at.09.42.21.mp4One solution to this is using context to disable all animations during pan/zoom. This probably works fine for most cases but breaks down in the following scenarios:
Ideally, the pan/zoom transformations would be applied separately from the path (and other) animations. Although I have a couple of ideas for how this could be done, I'm not currently sure what the best approach would be. Certainly would interested if you have any thoughts on this!
The more opinions the better! 🙂 I'm looking forward to hearing yours and others thoughts. To summarise my current opinions:
Hopefully the above is useful... as I'm sure you can tell, this is my first time working with the library, as well as delving into the source code. Please excuse me if anything above is dumb and/or unhelpful 😅 |
@bcheidemann I think we're converging on a similar idea on how this should work.
My code is a mess right now, but I'll work on cleaning things up when I get a little time and push up to a feature branch to share my current work. |
Nice! This all sounds great 🙂 I look forward to checking out your branch - I'm sure I can learn a lot from seeing how you've implemented things! It sounds like you've more or less got things under control but let me know if there's anything I can do to help. |
@bcheidemann following-up. I just pushed my current state to draft PR: #413 if you want to check it out and/or have any feedback. |
Available in version 41.11.0 |
Description
Hello! I am migrating from victory-native v36 to this one and I was wondering if there are plans to implement the VictoryZoomController.
https://formidable.com/open-source/victory/docs/victory-zoom-container/
Also, is there any example of implementing the zoom behavior using chart gestures? I thought on detecting the taps and measuring the distance between them, but I'm not sure if that will be performant enough. Open to ideas.
https://formidable.com/open-source/victory-native/cartesian/chart-gestures
Thank you!
The text was updated successfully, but these errors were encountered: