问题
I am looking for a tutorial where I can draw pie chart programmatically using Core Graphics or Quartz 2D in iOS. I want to understand how can we draw the PIE Chart which is gradient and having multi-color filled slices in it.
Note: Not looking for Coreplot framework.
Please share me some links regarding the same.
回答1:
I have used "XYPieChart" library in my so many apps and it's very easy to modify.
Available on github.
Link is given below:
https://github.com/xyfeng/XYPieChart
Still needs any help then let me know.
回答2:
You can also use this library, as this is also completely customisable and too easy to use.
Just use one line of code, this method along with the pie chart view used & the array with values to be rendered in the pie chart view:
- (void)renderInLayer:(RJPieChart *)layerHostingView dataArray:(NSMutableArray*)dataArray
Hope this helps.
Thanks
来源:https://stackoverflow.com/questions/13231244/draw-pie-chart-using-ios-quartz-2d