XYPieChart icon indicating copy to clipboard operation
XYPieChart copied to clipboard

PieChart is not animating when I added it from Storyboard

Open burakkilic opened this issue 13 years ago • 2 comments

Hi;

My setup is:

[self.pieChart setPieRadius:100.0];
[self.pieChart setDelegate:self];
[self.pieChart setDataSource:self];
[self.pieChart setStartPieAngle:M_PI_2];    //optional
[self.pieChart setAnimationSpeed:1.0];  //optional
[self.pieChart setLabelFont:[UIFont fontWithName:@"HelveticaNeue-Bold" size:14.0f]];    //optional
[self.pieChart setLabelColor:[UIColor blackColor]]; //optional, defaults to white
[self.pieChart setLabelRadius:110]; //optional
[self.pieChart setShowPercentage:YES];  //optional
[self.pieChart setPieBackgroundColor:[UIColor colorWithWhite:0.95 alpha:1]];    //optional   

And when it comes to 3rd section of my table view,

if([indexPath isEqual:[NSIndexPath indexPathForRow:0 inSection:3]]){
    [self.pieChart reloadData];
}

I see that it is not animating. Sometimes chart is not drawn. Is my setup wrong?

burakkilic avatar Nov 15 '12 12:11 burakkilic

I use XYPieChart in a Storyboard-driven project. And I also have used it in a UITableViewCell.

I had no problems animating it once I put the instantiation into tableView:cellForRowAtIndexPath: It looked pretty slick.

mtedesco avatar Apr 05 '13 11:04 mtedesco

@mtedesco Could you share a bit more about how you used XYPieChart inside your UITableViewCell? Did you set the Cell as the datasource and delegate of XYPieChart? If you wouldn't mind pasting a bit of code also on what you did it tableView: cellForRowAtIndexPath it'd be awesome.

Thanks

zallanx avatar Apr 11 '14 18:04 zallanx