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
So I have a collection view that has 8 items arranged single row (so it basically looks like a tableview). If I scroll the line chart into view and then out my app crashes saying fatal error: unexpectedly found nil while unwrapping an Optional value
It breaks on line 519 of LineChartRenderer.swift if I follow the code it looks like it's really stemming from here:
public func entryIndex(xIndex x: Int) -> Int
{
var low = 0
var high = _yVals.count - 1
var closest = -1while (low <= high)
{
var m = (high + low) / 2
var entry = _yVals[m]
if (x == entry.xIndex)
{
while (m > 0 && _yVals[m - 1].xIndex == x)
{
m--
}
return m
}
if (x > entry.xIndex)
{
low = m + 1
}
else
{
high = m - 1
}
closest = m
}
return closest
}
The only thing I can think of is _yVals is 0 but it's only crashing like this on the line chart. We have 1 line chart and 7 bar charts, is this just saying that the data set is nil?
Thanks!
The text was updated successfully, but these errors were encountered:
So I have a collection view that has 8 items arranged single row (so it basically looks like a tableview). If I scroll the line chart into view and then out my app crashes saying
fatal error: unexpectedly found nil while unwrapping an Optional value
It breaks on line 519 of LineChartRenderer.swift if I follow the code it looks like it's really stemming from here:
The only thing I can think of is
_yVals
is 0 but it's only crashing like this on the line chart. We have 1 line chart and 7 bar charts, is this just saying that the data set is nil?Thanks!
The text was updated successfully, but these errors were encountered: