SHPieChartView 1.0.3

SHPieChartView 1.0.3

测试已测试
语言语言 Objective-CObjective C
授权 MIT
发布最后发布2014年12月

Shan Ul Haq维护。



  • 作者:
  • Shan Ul Haq

SHPieChartView 是一个简单的可重用 UIView 子类,用于创建饼图。

如何使用

普通饼图

  SHPieChartView *normalPieChart = [[SHPieChartView alloc] initWithFrame:CGRectMake(10, 230, 150, 150)];

  [normalPieChart addAngleValue:0.40 andClolor:[UIColor redColor]];
  [normalPieChart addAngleValue:0.20 andClolor:[UIColor greenColor]];
  [normalPieChart addAngleValue:0.30 andClolor:[UIColor blueColor]];
  [normalPieChart addAngleValue:0.10 andClolor:[UIColor orangeColor]];

  [self.view addSubview:normalPieChart];

同心饼图

  SHPieChartView *concentricPieChart = [[SHPieChartView alloc] initWithFrame:CGRectMake(10, 10, 200, 200)];
  concentricPieChart.chartBackgroundColor = UIColorFromRGB(0xFAFAFA);

  concentricPieChart.isConcentric = YES;
  concentricPieChart.concentricRadius = 70;
  concentricPieChart.concentricColor = UIColorFromRGB(0x54525C);

  [concentricPieChart addAngleValue:0.40 andClolor:[UIColor redColor]];

  [self.view addSubview:concentricPieChart];

半饼图

  SHPieChartView *halfChart = [[SHPieChartView alloc] initWithFrame:CGRectMake(10, 400, 100, 100)];
  [halfChart addAngleValue:0.40 andClolor:UIColorFromRGB(0x3C60A3)];

  [self.view addSubview:halfChart];

chart image

LICENSE

查看LICENSE