{"action":"created","issue":{"url":"https://api.github.com/repos/danielgindi/Charts/issues/1517","repository_url":"https://api.github.com/repos/danielgindi/Charts","labels_url":"https://api.github.com/repos/danielgindi/Charts/issues/1517/labels{/name}","comments_url":"https://api.github.com/repos/danielgindi/Charts/issues/1517/comments","events_url":"https://api.github.com/repos/danielgindi/Charts/issues/1517/events","html_url":"https://github.com/danielgindi/Charts/issues/1517","id":178408964,"number":1517,"title":"Re: Fatal error while loading Bar Chart #1511","user":{"login":"codyfazio","id":10542913,"avatar_url":"https://avatars.githubusercontent.com/u/10542913?v=3","gravatar_id":"","url":"https://api.github.com/users/codyfazio","html_url":"https://github.com/codyfazio","followers_url":"https://api.github.com/users/codyfazio/followers","following_url":"https://api.github.com/users/codyfazio/following{/other_user}","gists_url":"https://api.github.com/users/codyfazio/gists{/gist_id}","starred_url":"https://api.github.com/users/codyfazio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codyfazio/subscriptions","organizations_url":"https://api.github.com/users/codyfazio/orgs","repos_url":"https://api.github.com/users/codyfazio/repos","events_url":"https://api.github.com/users/codyfazio/events{/privacy}","received_events_url":"https://api.github.com/users/codyfazio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-21T17:14:23Z","updated_at":"2016-09-21T17:25:40Z","closed_at":null,"body":"I'm sorry, it looks like the problem persists.  I actually tried adding the new check in before I posted last time, but was still having issues. My number seems to be fine, but the value returned from roundToNextSignificant() is Inf, which is causing the crash. Should another check be performed after the value comes back? \r\n\r\n internal class func roundToNextSignificant(number: Double) -> Double\r\n    {\r\n        if number.isInfinite || number.isNaN || number == 0\r\n        {\r\n            return number\r\n        }\r\n        \r\n        let d = ceil(log10(number < 0.0 ? -number : number))\r\n        let pw = 1 - Int(d)\r\n        let magnitude = pow(Double(10.0), Double(pw))\r\n        let shifted = round(number * magnitude)\r\n        return shifted / magnitude\r\n    }\r\n    \r\n    internal class func decimals(_ number: Double) -> Int\r\n    {\r\n        if number.isInfinite || number.isNaN || number == 0\r\n        {\r\n            return 0\r\n        }\r\n        \r\n        let i = roundToNextSignificant(number: Double(number))\r\n        return Int(ceil(-log10(i))) + 2\r\n    }"},"comment":{"url":"https://api.github.com/repos/danielgindi/Charts/issues/comments/248682842","html_url":"https://github.com/danielgindi/Charts/issues/1517#issuecomment-248682842","issue_url":"https://api.github.com/repos/danielgindi/Charts/issues/1517","id":248682842,"user":{"login":"danielgindi","id":366926,"avatar_url":"https://avatars.githubusercontent.com/u/366926?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgindi","html_url":"https://github.com/danielgindi","followers_url":"https://api.github.com/users/danielgindi/followers","following_url":"https://api.github.com/users/danielgindi/following{/other_user}","gists_url":"https://api.github.com/users/danielgindi/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgindi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgindi/subscriptions","organizations_url":"https://api.github.com/users/danielgindi/orgs","repos_url":"https://api.github.com/users/danielgindi/repos","events_url":"https://api.github.com/users/danielgindi/events{/privacy}","received_events_url":"https://api.github.com/users/danielgindi/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T17:25:40Z","updated_at":"2016-09-21T17:25:40Z","body":"What exactly is your setup? As we do not see any reason for an Infinite value to get in there"}}
{"actor":{"display_login":"danielgindi"}}