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

Provide callbacks on ChartViewDelegate to better handle dragging, touch, etc #451

Closed
iangmaia opened this issue Oct 6, 2015 · 1 comment

Comments

@iangmaia
Copy link
Contributor

iangmaia commented Oct 6, 2015

Since the chart already has GestureRecognizers (making it hard to add our own), there could be callback methods in the "should*" fashion to pass to the delegate the touched Point and to let the delegate allow or not the chart to pan.
This is useful, for instance, if I want to draw something on the chart as the user drags his finger over it instead of panning the chart.

It is possible to achieve the same having a container view with touchesBegan, touchesMoved, etc and using the "dragEnabled" property and the isInBounds methods, but having it in the delegate would be cleaner, more natural and flexible.

@danielgindi
Copy link
Collaborator

You don't have to do all of that. You just add your own gesture recognizers in addition to whatever is in the chart.
We don't add custom APIs for anything that is supported natively by iOS.

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

No branches or pull requests

2 participants