kevinzhow

Fix #189

@@ -394,7 +394,7 @@ @@ -394,7 +394,7 @@
394 if (!(_yValueMax - _yValueMin)) { 394 if (!(_yValueMax - _yValueMin)) {
395 innerGrade = 0.5; 395 innerGrade = 0.5;
396 } else { 396 } else {
397 - innerGrade = (yValue - _yValueMin) / (_yValueMax - _yValueMin); 397 + innerGrade = (yValue - _yValueMin) / (_yValueMax - _yValueMin) == 0 ? 0.5 : (yValue - _yValueMin) / (_yValueMax - _yValueMin);
398 } 398 }
399 399
400 CGFloat offSetX = (_chartCavanWidth) / (chartData.itemCount); 400 CGFloat offSetX = (_chartCavanWidth) / (chartData.itemCount);