Showing
1 changed file
with
2 additions
and
0 deletions
| @@ -80,6 +80,7 @@ | @@ -80,6 +80,7 @@ | ||
| 80 | PNChartLabel * label = [[PNChartLabel alloc] initWithFrame:CGRectMake((index * _xLabelWidth + chartMargin), self.frame.size.height - 30.0, _xLabelWidth, 20.0)]; | 80 | PNChartLabel * label = [[PNChartLabel alloc] initWithFrame:CGRectMake((index * _xLabelWidth + chartMargin), self.frame.size.height - 30.0, _xLabelWidth, 20.0)]; |
| 81 | [label setTextAlignment:NSTextAlignmentCenter]; | 81 | [label setTextAlignment:NSTextAlignmentCenter]; |
| 82 | label.text = labelText; | 82 | label.text = labelText; |
| 83 | + [_labels addObject:label]; | ||
| 83 | [self addSubview:label]; | 84 | [self addSubview:label]; |
| 84 | } | 85 | } |
| 85 | } | 86 | } |
| @@ -110,6 +111,7 @@ | @@ -110,6 +111,7 @@ | ||
| 110 | bar.backgroundColor = _barBackgroundColor; | 111 | bar.backgroundColor = _barBackgroundColor; |
| 111 | bar.barColor = [self barColorAtIndex:index]; | 112 | bar.barColor = [self barColorAtIndex:index]; |
| 112 | bar.grade = grade; | 113 | bar.grade = grade; |
| 114 | + [_bars addObject:bar]; | ||
| 113 | [self addSubview:bar]; | 115 | [self addSubview:bar]; |
| 114 | 116 | ||
| 115 | index += 1; | 117 | index += 1; |
-
Please register or login to post a comment