Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

grevolution/SHPieChartView

Open more actions menu

Repository files navigation

SHPieChartView

SHPieChartView is a simple reusable UIView Sublcass that creates Pie Charts.

Build Status

##How to Use It

###Normal Pie Chart

  SHPieChartView *normalPieChart = [[SHPieChartView alloc] initWithFrame:CGRectMake(10, 230, 150, 150)];
  
  [normalPieChart addAngleValue:0.40 andColor:[UIColor redColor]];
  [normalPieChart addAngleValue:0.20 andColor:[UIColor greenColor]];
  [normalPieChart addAngleValue:0.30 andColor:[UIColor blueColor]];
  [normalPieChart addAngleValue:0.10 andColor:[UIColor orangeColor]];
  
  [self.view addSubview:normalPieChart];

###Concentric Pie Chart

  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 andColor:[UIColor redColor]];

  [self.view addSubview:concentricPieChart];

###Half Pie Chart

  SHPieChartView *halfChart = [[SHPieChartView alloc] initWithFrame:CGRectMake(10, 400, 100, 100)];
  [halfChart addAngleValue:0.40 andColor:UIColorFromRGB(0x3C60A3)];
  
  [self.view addSubview:halfChart];

chart image

###Contact Me

Shan Ul Haq (http://grevolution.me)

###LICENSE

see LICENSE

About

a reusable UIView subclass to create Pie Charts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.