Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
pmairoldi committed Sep 25, 2016
1 parent 3ca54dd commit 7bc798b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Charts/Utils/ChartUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ open class ChartUtils
}

let i = roundToNextSignificant(number: Double(number))

if i.isNaN || i.isInfinite
{
return 0
}

return Int(ceil(-log10(i))) + 2
}

Expand Down

0 comments on commit 7bc798b

Please sign in to comment.