I am new to iphone development and coreplot. I want to draw a barchart according to some data, that i have done. now i want to give some animations to the bars of plot. That means bars in the graph should lengten or shorten in a growing or shrinking efect.
Can anybody开发者_开发技巧 help me?
Thanks in advance.
Kindly refer the following post: How to access CALayer of individual bar in core-plot?
It talks about precisely the same thing you are trying to do.
I dont know what class you might be using, but most probably it is a subclass of CA Layer. Check this code out:
CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@"transform"];
CATransform3D transform = CATransform3DMakeRotation(DegreesToRadians(360), 0, 0, 1);
rotation.toValue = [NSValue valueWithCATransform3D:transform];
rotation.duration = 10.0f;
[pieChart addAnimation:rotation forKey:@"rotation"];
How to animate the pie charts developed using core-plot library?
精彩评论