kevinzhow

Fix readme about delegate

Showing 1 changed file with 3 additions and 12 deletions
@@ -77,30 +77,21 @@ You will need LLVM 3.0 or later in order to build PNChart. @@ -77,30 +77,21 @@ You will need LLVM 3.0 or later in order to build PNChart.
77 77
78 #### Callback 78 #### Callback
79 79
  80 +Currently callback only works on Linechart
  81 +
80 ```objective-c 82 ```objective-c
81 #import "PNChart.h" 83 #import "PNChart.h"
82 84
83 //For LineChart 85 //For LineChart
84 86
85 -PNChart * lineChart = [[PNChart alloc] initWithFrame:CGRectMake(0, 135.0, SCREEN_WIDTH, 200.0)];  
86 -lineChart.backgroundColor = [UIColor clearColor];  
87 -[lineChart setXLabels:@[@"SEP 1",@"SEP 2",@"SEP 3",@"SEP 4",@"SEP 5",@"SEP 6",@"SEP 7"]];  
88 -[lineChart setYValues:@[@1,@24,@12,@18,@30,@10,@21]];  
89 -[lineChart strokeChart];  
90 -  
91 lineChart.delegate = self; 87 lineChart.delegate = self;
92 88
93 -[viewController.view addSubview:lineChartLabel];  
94 -[viewController.view addSubview:lineChart];  
95 -  
96 -viewController.title = @"Line Chart";  
97 89
98 ``` 90 ```
99 91
100 ```objective-c 92 ```objective-c
101 - #import "PNChart.h"  
102 93
103 - //For DelegateMethod 94 +//For DelegateMethod
104 95
105 96
106 -(void)userClickedOnLineKeyPoint:(CGPoint)point andPointIndex:(NSInteger)index{ 97 -(void)userClickedOnLineKeyPoint:(CGPoint)point andPointIndex:(NSInteger)index{