I’ve mentioned a number of open source charting libraries including the extensive Core Plot library, and most recently a library allowing you to create contiguous graphs and clock charts.
Here’s a simple to use charting library with a nice clean style called PNChart.
What sets PNChart apart from other libraries I’ve mentioned is its ease of use. You can easily define the values and labels within a few arrays, and generate some very nice looking charts.
Here’s an image and source code example from the example included with PNChart demonstrating its ease of use:
Generated with the code:
UILabel * lineChartLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 30, SCREEN_WIDTH, 30)];
lineChartLabel.text = @"Line Chart";
lineChartLabel.textColor = PNFreshGreen;
lineChartLabel.font = [UIFont fontWithName:@"Avenir-Medium" size:23.0];
lineChartLabel.textAlignment = NSTextAlignmentCenter;
PNChart * lineChart = [[PNChart alloc] initWithFrame:CGRectMake(0, 75.0, SCREEN_WIDTH, 200.0)];
lineChart.backgroundColor = [UIColor clearColor];
[lineChart setXLabels:@[@"SEP 1",@"SEP 2",@"SEP 3",@"SEP 4",@"SEP 5",@"SEP 6",@"SEP 7"]];
[lineChart setYValues:@[@1,@24,@12,@18,@30,@10,@21]];
[lineChart strokeChart];
[self.chartScrollView addSubview:lineChartLabel];
[self.chartScrollView addSubview:lineChart];
//Add BarChart
UILabel * barChartLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 300, SCREEN_WIDTH, 30)];
barChartLabel.text = @"Bar Chart";
barChartLabel.textColor = PNFreshGreen;
barChartLabel.font = [UIFont fontWithName:@"Avenir-Medium" size:23.0];
barChartLabel.textAlignment = NSTextAlignmentCenter;
PNChart * barChart = [[PNChart alloc] initWithFrame:CGRectMake(0, 335.0, SCREEN_WIDTH, 200.0)];
barChart.backgroundColor = [UIColor clearColor];
barChart.type = PNBarType;
[barChart setXLabels:@[@"SEP 1",@"SEP 2",@"SEP 3",@"SEP 4",@"SEP 5",@"SEP 6",@"SEP 7"]];
[barChart setYValues:@[@1,@24,@12,@18,@30,@10,@21]];
[barChart strokeChart];
[self.chartScrollView addSubview:barChartLabel];
[self.chartScrollView addSubview:barChart];
You can find PNChart on Github here.
A very easy to use charting library.
- Open Source: New Easy Facebook API Helper Library Using Blocks
- Open Source: Easy To Use ARC Compatible iOS Reachability Class That Uses GCD And Blocks
- Open Source: Library For Easy Usage Of The FourSquare API In iOS Apps
- Open Source iOS Objective-C Categories For Fast, Easy, Clean, Threaded Disk I/O
- Open Source: Plotting Libraries For Easy Charts Without The Cost
Original article: Very Easy To Use Open Source iOS Charting Library With A Clean Look
©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.





