draw pie chart using iOS quartz 2D

狂风中的少年 提交于 2020-02-24 11:23:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!