PNChart icon indicating copy to clipboard operation
PNChart copied to clipboard

PNPireChart画饼状图时添加间距

Open Gusont opened this issue 7 years ago • 1 comments

CGFloat sinf = sin((endPercentage - startPercentage) * M_PI + startPercentage * M_PI * 2 ) * self.itemSpacing; CGFloat cosf = cos((endPercentage - startPercentage) * M_PI + startPercentage * M_PI * 2) * self.itemSpacing;

CGPoint center = CGPointMake(CGRectGetMidX(self.bounds) + sinf ,CGRectGetMidY(self.bounds) - cosf);

大意就是通过改变中心点的位置修改item的位置 default

Gusont avatar Oct 11 '18 08:10 Gusont

simulator screen shot - iphone xs max - 2018-10-11 at 16 26 50 simulator screen shot - iphone xs max - 2018-10-11 at 16 27 16

Gusont avatar Oct 11 '18 08:10 Gusont