Merge pull request #132 from MrWooJ/fixing-Issue#104
Fixing Issue #104
Showing
2 changed files
with
6 additions
and
3 deletions
| @@ -125,12 +125,12 @@ | @@ -125,12 +125,12 @@ | ||
| 125 | 125 | ||
| 126 | if (labelAddCount == _xLabelSkip) { | 126 | if (labelAddCount == _xLabelSkip) { |
| 127 | NSString *labelText = [_xLabels[index] description]; | 127 | NSString *labelText = [_xLabels[index] description]; |
| 128 | - PNChartLabel * label = [[PNChartLabel alloc] initWithFrame:CGRectZero]; | 128 | + PNChartLabel * label = [[PNChartLabel alloc] initWithFrame:CGRectMake(0, 0, _xLabelWidth, xLabelHeight)]; |
| 129 | label.font = _labelFont; | 129 | label.font = _labelFont; |
| 130 | label.textColor = _labelTextColor; | 130 | label.textColor = _labelTextColor; |
| 131 | [label setTextAlignment:NSTextAlignmentCenter]; | 131 | [label setTextAlignment:NSTextAlignmentCenter]; |
| 132 | label.text = labelText; | 132 | label.text = labelText; |
| 133 | - [label sizeToFit]; | 133 | + //[label sizeToFit]; |
| 134 | CGFloat labelXPosition; | 134 | CGFloat labelXPosition; |
| 135 | if (_rotateForXAxisText){ | 135 | if (_rotateForXAxisText){ |
| 136 | label.transform = CGAffineTransformMakeRotation(M_PI / 4); | 136 | label.transform = CGAffineTransformMakeRotation(M_PI / 4); |
| @@ -19,8 +19,11 @@ | @@ -19,8 +19,11 @@ | ||
| 19 | self.backgroundColor = [UIColor clearColor]; | 19 | self.backgroundColor = [UIColor clearColor]; |
| 20 | self.textAlignment = NSTextAlignmentCenter; | 20 | self.textAlignment = NSTextAlignmentCenter; |
| 21 | self.userInteractionEnabled = YES; | 21 | self.userInteractionEnabled = YES; |
| 22 | - self.minimumScaleFactor = 0.8; | ||
| 23 | self.adjustsFontSizeToFitWidth = YES; | 22 | self.adjustsFontSizeToFitWidth = YES; |
| 23 | + self.numberOfLines = 0; | ||
| 24 | + /* if you want to see ... in large labels un-comment this line | ||
| 25 | + self.minimumScaleFactor = 0.8; | ||
| 26 | + */ | ||
| 24 | } | 27 | } |
| 25 | 28 | ||
| 26 | return self; | 29 | return self; |
-
Please register or login to post a comment