When first displaying a bar chart using Core Plot, I\'d like the bars to grow upward until they reach their correct heights.
How would you create such an animation usi
Add animation for your CPTBarPlot as follows:
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
[animation setDuration:1];
CATransform3D transform = CATransform3DMakeScale(1, 0.0001, 1);
// offsetY=[PlotDisplayAreaUnderXAxisHeight]-[PlotDisplayAreaHeight]/2
transform = CATransform3DConcat(transform, CATransform3DMakeTranslation(0, offsetY, 0));
animation.fromValue = [NSValue valueWithCATransform3D:transform];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
[barPlot addAnimation:animation forKey:@"barGrowth"];