- Fix for Bar Chart. When barchart.showLabel was NO - barchart view was just emp…
…ty and did not show any graphics.
Showing
1 changed file
with
4 additions
and
3 deletions
| @@ -135,9 +135,10 @@ | @@ -135,9 +135,10 @@ | ||
| 135 | }else{ | 135 | }else{ |
| 136 | _xChartLabels = [NSMutableArray new]; | 136 | _xChartLabels = [NSMutableArray new]; |
| 137 | } | 137 | } |
| 138 | - | 138 | + |
| 139 | - if (_showLabel) { | 139 | + _xLabelWidth = (self.frame.size.width - _chartMargin * 2) / [xLabels count]; |
| 140 | - _xLabelWidth = (self.frame.size.width - _chartMargin * 2) / [xLabels count]; | 140 | + |
| 141 | + if (_showLabel) { | ||
| 141 | int labelAddCount = 0; | 142 | int labelAddCount = 0; |
| 142 | for (int index = 0; index < _xLabels.count; index++) { | 143 | for (int index = 0; index < _xLabels.count; index++) { |
| 143 | labelAddCount += 1; | 144 | labelAddCount += 1; |
-
Please register or login to post a comment