效果图:
代码下载:http://pan.baidu.com/s/1o6BGz0m http://download.csdn.net/detail/qqmcy/7090865
饼图的第三方类在例子中是有的,使用起来也很简单,下面是使用的代码。
ViewController.h
#import <UIKit/UIKit.h>
#import "PieChartView.h"
@interface ViewController : UIViewController<PieChartDelegate>
@property (nonatomic,strong) NSMutableArray *m_valueArray; //第一组数据的容器
@property (nonatomic,strong) NSMutableArray *m_colorArray; //第一组颜色的容器
@property (nonatomic,strong) NSMutableArray *m_valueArray2;//第二组数据的容器
@property (nonatomic,strong) NSMutableArray *m_colorArray2;//第二组颜色的容器
@property (nonatomic,strong) PieChartView *m_pieChartView; //饼图类
@property (nonatomic,strong) UIView *m_pieContainer;