We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49fabc1 commit 42b6f7dCopy full SHA for 42b6f7d
TEAChart/TEABarChart.m
@@ -74,7 +74,7 @@ - (void)drawRect:(CGRect)rect
74
75
for (NSInteger i = 0; i < numberOfBars; i += 1)
76
{
77
- CGFloat barHeight = barMaxHeight * [self.data[i] floatValue] / max;
+ CGFloat barHeight = (max == 0 ? 0 : barMaxHeight * [self.data[i] floatValue] / max);
78
if (barHeight > barMaxHeight) {
79
barHeight = barMaxHeight;
80
}
0 commit comments