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
kevinzhow
2013-12-12 08:42:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
302673b61cb1ba88376603abe4633ca31d74fa01
302673b6
1 parent
eeffac77
Fix readme about delegate
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
README.md
README.md
View file @
302673b
...
...
@@ -77,30 +77,21 @@ You will need LLVM 3.0 or later in order to build PNChart.
#### Callback
Currently callback only works on Linechart
```
objective-c
#import "PNChart.h"
//For LineChart
PNChart
*
lineChart =
[
[PNChart alloc
]
initWithFrame:CGRectMake(0, 135.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
]
;
lineChart.delegate = self;
[
viewController.view addSubview:lineChartLabel
]
;
[
viewController.view addSubview:lineChart
]
;
viewController.title = @"Line Chart";
```
```
objective-c
#import "PNChart.h"
//For DelegateMethod
//For DelegateMethod
-(void)userClickedOnLineKeyPoint:(CGPoint)point andPointIndex:(NSInteger)index{
...
...
Please
register
or
login
to post a comment