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
Chart can't move when inside a PageView #102
Comments
Try this days but not work, any ideas? |
I think this has something to do with the OptimizedGestureDetector library because every time the chart's horizontal drag gesture enters the gesture arena always ended with a loss. My temporary workaround will be wrapping the chart in a new GestureDetector and use the painter to translate the chart. But the downside to this is I was not able to fling the chart. |
I try to modify the OptimizedGestureDetector which have multiple GestureRecognizers but only one GestureRecognizer can win in arena, I don't find a solution which can let all GestureRecognizers(all belong to OptimizedGestureDetector ) win together |
finally I find a solution in version 0.2.1, you can see the Scrolling Charts's View Pager Demo to see how to solve this. Though Its worked, it is not perfect yet. The reason is below |
If a chart is inside a PageView, swiping horizontally does not move the chart but instead moving the PageView.
Steps to reproduce:
1: Create a chart inside a PageView. This PageView should have more than 2 pages.
2: Pinch the chart to zoom in
3: Drag the chart to move but can't. If you drag vertically then switch to horizontally, the chart can move normally. However, If you try to move it horizontally first, it will not work.
The text was updated successfully, but these errors were encountered: