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

Pie chart does not work well with separate animations on x and y axis simultaneously #456

Closed
liuxuan30 opened this issue Oct 7, 2015 · 4 comments

Comments

@liuxuan30
Copy link
Member

Got this issue on SO:http://stackoverflow.com/questions/32970306/piechart-for-ios-charts-broken-in-swift-2-0/32982328#32982328

Demo project is also in that post, you may need to add Charts framework on your side manually to get it work (it is using Pods)

The issue is the pie chart is using two animate at the same time like below:

pieChartView.animate(xAxisDuration: 1.5, easingOption: ChartEasingOption.EaseOutBack)
pieChartView.animate(yAxisDuration: 1.5, easingOption: ChartEasingOption.EaseOutBack)

We do have a method to animate both axis:

pieChartView.animate(xAxisDuration: 1.5, yAxisDuration: 1.5, easingOption: ChartEasingOption.EaseOutBack)

Just want to double check, is it allowed to use two animate() on x and y axis at the same time? If so, then we have a bug here.

BTW, the author mentioned it is fine before swift 2.0 merged into master, not sure what animation logic changed since then

@danielgindi
Copy link
Collaborator

Actually I encountered this two days ago and haven't had the chance yet to fix it.
The second call should abort the first one, but for some reason it does not reset its phase variable.

@danielgindi
Copy link
Collaborator

Actually the second call aborts the first one - but it shouldn't. As the behaviour on the Android allows one to start after the other (to potentially delay the second animation to the middle of the first one)

@danielgindi
Copy link
Collaborator

I'll look into this later, and replace the stop() call with an update to the animation variables.

@liuxuan30
Copy link
Member Author

@danielgindi how this should work? User adding multiple animate() are allowed? Just keep the first animation?

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

No branches or pull requests

2 participants