From f48d76fdd0c009a0f9089a38492d01e59c9b8ccc Mon Sep 17 00:00:00 2001 From: Shad Date: Thu, 27 Oct 2016 13:49:06 -0400 Subject: [PATCH] Added a check against NaN There needs to be a check against NaN after ChartUtils::roundToNextSignificant() returns. --- Source/Charts/Utils/ChartUtils.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Charts/Utils/ChartUtils.swift b/Source/Charts/Utils/ChartUtils.swift index 14f6d89c70..17b85e167c 100755 --- a/Source/Charts/Utils/ChartUtils.swift +++ b/Source/Charts/Utils/ChartUtils.swift @@ -51,7 +51,7 @@ open class ChartUtils let i = roundToNextSignificant(number: Double(number)) - if i.isInfinite + if i.isInfinite || i.isNaN { return 0 }