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-15 11:36:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
47e8c79c1f89fddf15ac6e1aedf1f14cdcc7801d
47e8c79c
1 parent
6d9e48fd
Update readme about line
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
README.md
README.md
View file @
47e8c79
...
...
@@ -40,7 +40,7 @@ You will need LLVM 3.0 or later in order to build PNChart.
//For LineChart
PNLineChart * lineChart = [[PNLineChart alloc] initWithFrame:CGRectMake(0, 135.0, SCREEN_WIDTH, 200.0)];
[lineChart setXLabels:@[@"SEP 1",@"SEP 2",@"SEP 3",@"SEP 4",@"SEP 5"]];
// Line Chart Nr.1
PNLineChartData *data01 = [PNLineChartData new];
data01.color = [UIColor redColor];
...
...
@@ -49,7 +49,7 @@ You will need LLVM 3.0 or later in order to build PNChart.
CGFloat y = item * 10;
return [PNLineChartDataItem dataItemWithY:y];
};
// Line Chart Nr.2
PNLineChartData *data02 = [PNLineChartData new];
data02.color = [UIColor blueColor];
...
...
@@ -58,7 +58,7 @@ You will need LLVM 3.0 or later in order to build PNChart.
CGFloat y = item == 0 ? (item * 5) + 10 : (item * 5);
return [PNLineChartDataItem dataItemWithY:y];
};
lineChart.chartData = @[data01, data02];
[lineChart strokeChart];
...
...
@@ -111,12 +111,12 @@ lineChart.delegate = self;
//For DelegateMethod
-(void)userClickedOnLineKeyPoint:(CGPoint)point
andPointIndex:(NSInteger)i
ndex{
NSLog(@"Click Key on line %f, %f
and index is %d",point.x, point.y,i
ndex);
-(void)userClickedOnLineKeyPoint:(CGPoint)point
lineIndex:(NSInteger)lineIndex andPointIndex:(NSInteger)pointI
ndex{
NSLog(@"Click Key on line %f, %f
line index is %d and point index is %d",point.x, point.y,(int)lineIndex, (int)pointI
ndex);
}
-(void)userClickedOnLinePoint:(CGPoint)point {
NSLog(@"Click on line %f, %f
",point.x, point.y
);
-(void)userClickedOnLinePoint:(CGPoint)point
lineIndex:(NSInteger)lineIndex
{
NSLog(@"Click on line %f, %f
, line index is %d",point.x, point.y, (int)lineIndex
);
}
```
...
...
Please
register
or
login
to post a comment