Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
PNChart
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
kevin
2013-12-01 15:42:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d09a60449911549d2e4bfe1455829e80173629c3
d09a6044
1 parent
0b301570
Add document for Circle Chart
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
14 deletions
PNChartDemo/PCChartsTableViewController.m
README.md
PNChartDemo/PCChartsTableViewController.m
View file @
d09a604
...
...
@@ -116,10 +116,6 @@
}
}
...
...
README.md
View file @
d09a604
#PNChart
A simple and beautiful chart lib with animation used in
[
Piner
](
https://itunes.apple.com/us/app/piner/id637706410
)
for iOS
[

](http://dl.dropboxusercontent.com/u/1599662/pnchart.png)
A simple and beautiful chart lib with
**animation**
used in
[
Piner
](
https://itunes.apple.com/us/app/piner/id637706410
)
for iOS
## Requirements
...
...
@@ -24,31 +22,56 @@ You will need LLVM 3.0 or later in order to build PNChart.
[
CocoaPods
](
http://cocoapods.org
)
is the recommended way to add PNChart to your project.
1.
Add a pod entry for PNChart to your Podfile
`pod 'PNChart', '~> 0.
1.8
'`
1.
Add a pod entry for PNChart to your Podfile
`pod 'PNChart', '~> 0.
2.0
'`
2.
Install the pod(s) by running
`pod install`
.
3.
Include PNChart wherever you need it with
`#import "PNChart.h"`
.
### Copy the PNChart folder to your project
#### Line Chart
[

](https://dl.dropboxusercontent.com/u/1599662/line.png)
```
objective-c
#import "PNChart.h"
//For LineChart
PNChart * lineChart = [[PNChart alloc] initWithFrame:CGRectMake(0,
7
5.0, SCREEN_WIDTH, 200.0)];
PNChart * lineChart = [[PNChart alloc] initWithFrame:CGRectMake(0,
13
5.0, SCREEN_WIDTH, 200.0)];
[lineChart setXLabels:@[@"SEP 1",@"SEP 2",@"SEP 3",@"SEP 4",@"SEP 5"]];
[lineChart setYValues:@[@
"1",@"10",@"2",@"6",@"3"
]];
[lineChart setYValues:@[@
1, @10, @2, @6, @3
]];
[lineChart strokeChart];
```
[

](https://dl.dropboxusercontent.com/u/1599662/bar.png)
```
objective-c
#import "PNChart.h"
//For BarChart
PNChart * barChart = [[PNChart alloc] initWithFrame:CGRectMake(0,
7
5.0, SCREEN_WIDTH, 200.0)];
PNChart * barChart = [[PNChart alloc] initWithFrame:CGRectMake(0,
13
5.0, SCREEN_WIDTH, 200.0)];
barChart.type = PNBarType;
[barChart setXLabels:@[@"SEP 1",@"SEP 2",@"SEP 3",@"SEP 4",@"SEP 5"]];
[barChart setYValues:@[@
"1",@"10",@"2",@"6",@"3"
]];
[barChart setYValues:@[@
1, @10, @2, @6, @3
]];
[barChart strokeChart];
//By strokeColor you can change the chart color
[barChart setStrokeColor:PNTwitterColor];
```
[

](https://dl.dropboxusercontent.com/u/1599662/circle.png)
```
objective-c
#import "PNChart.h"
//For CircleChart
PNChart
*
circleChart =
[
[PNChart alloc
]
initWithFrame:CGRectMake(0, 135.0, SCREEN_WIDTH, 200.0)];
circleChart.type = PNCircleType;
circleChart.total =
[
NSNumber numberWithInt:100
]
;
circleChart.current =
[
NSNumber numberWithInt:60
]
;
[
circleChart strokeChart
]
;
```
## License
...
...
Please
register
or
login
to post a comment