You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code below, if all values are 0, yValueMax tries to ge yMinValue. But since yMinValue is not initialized, the app crashes.
func getYValueMax(yLabels:NSArray){letmax:CGFloat=CGFloat(yLabels.valueForKeyPath("@max.floatValue")as!Float)
if max ==0{
yValueMax = yMinValue
}else{
yValueMax = max
}}
Can be temporarily fixed by manually setting barChart.yMinValue when initializing.
The text was updated successfully, but these errors were encountered:
In the code below, if all values are 0, yValueMax tries to ge yMinValue. But since yMinValue is not initialized, the app crashes.
Can be temporarily fixed by manually setting
barChart.yMinValue
when initializing.The text was updated successfully, but these errors were encountered: