Merge pull request #167 from nenuadrian/patch-2
Update PNLineChart.m
Showing
1 changed file
with
14 additions
and
0 deletions
| @@ -101,6 +101,20 @@ | @@ -101,6 +101,20 @@ | ||
| 101 | } | 101 | } |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | +- (CGFloat)computeEqualWidthForXLabels:(NSArray *)xLabels | ||
| 105 | +{ | ||
| 106 | + CGFloat xLabelWidth; | ||
| 107 | + | ||
| 108 | + if (_showLabel) { | ||
| 109 | + xLabelWidth = _chartCavanWidth / [xLabels count]; | ||
| 110 | + } else { | ||
| 111 | + xLabelWidth = (self.frame.size.width) / [xLabels count]; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + return xLabelWidth; | ||
| 115 | +} | ||
| 116 | + | ||
| 117 | + | ||
| 104 | - (void)setXLabels:(NSArray *)xLabels | 118 | - (void)setXLabels:(NSArray *)xLabels |
| 105 | { | 119 | { |
| 106 | CGFloat xLabelWidth; | 120 | CGFloat xLabelWidth; |
-
Please register or login to post a comment