{"action":"created","issue":{"url":"https://api.github.com/repos/dima117/Chart.Scatter/issues/30","repository_url":"https://api.github.com/repos/dima117/Chart.Scatter","labels_url":"https://api.github.com/repos/dima117/Chart.Scatter/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/dima117/Chart.Scatter/issues/30/comments","events_url":"https://api.github.com/repos/dima117/Chart.Scatter/issues/30/events","html_url":"https://github.com/dima117/Chart.Scatter/issues/30","id":119185440,"number":30,"title":"Test undefined data in range calculation","user":{"login":"zup1","id":6561405,"avatar_url":"https://avatars.githubusercontent.com/u/6561405?v=3","gravatar_id":"","url":"https://api.github.com/users/zup1","html_url":"https://github.com/zup1","followers_url":"https://api.github.com/users/zup1/followers","following_url":"https://api.github.com/users/zup1/following{/other_user}","gists_url":"https://api.github.com/users/zup1/gists{/gist_id}","starred_url":"https://api.github.com/users/zup1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zup1/subscriptions","organizations_url":"https://api.github.com/users/zup1/orgs","repos_url":"https://api.github.com/users/zup1/repos","events_url":"https://api.github.com/users/zup1/events{/privacy}","received_events_url":"https://api.github.com/users/zup1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-27T12:06:38Z","updated_at":"2016-02-14T15:05:38Z","closed_at":"2016-02-14T15:01:07Z","body":"In function _calculateRange if the point value is not a number the range is undefined. So I have inserted the test of the value.\r\n\r\n\t\t_calculateRange: function () {\r\n\r\n\t\t\tvar xmin = undefined,\r\n\t\t\t\txmax = undefined,\r\n\t\t\t\tymin = undefined,\r\n\t\t\t\tymax = undefined;\r\n\r\n\t\t\tthis._forEachPoint(function (point) {\r\n\r\n\t\t\t\t// min x\r\n\t\t\t\tif (!isNaN(point.arg) && (xmin === undefined || point.arg < xmin)) {\r\n\t\t\t\t\txmin = point.arg;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// max x\r\n\t\t\t\tif (!isNaN(point.arg) && (xmax === undefined || point.arg > xmax)) {\r\n\t\t\t\t\txmax = point.arg;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// min y\r\n\t\t\t\tif (!isNaN(point.value) && (ymin === undefined || point.value < ymin)) {\r\n\t\t\t\t\tymin = point.value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// max y\r\n\t\t\t\tif (!isNaN(point.value) && (ymax === undefined || point.value > ymax)) {\r\n\t\t\t\t\tymax = point.value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn {\r\n\t\t\t\txmin: xmin,\r\n\t\t\t\txmax: xmax,\r\n\t\t\t\tymin: ymin,\r\n\t\t\t\tymax: ymax\r\n\t\t\t}\r\n"},"comment":{"url":"https://api.github.com/repos/dima117/Chart.Scatter/issues/comments/183903681","html_url":"https://github.com/dima117/Chart.Scatter/issues/30#issuecomment-183903681","issue_url":"https://api.github.com/repos/dima117/Chart.Scatter/issues/30","id":183903681,"user":{"login":"dima117","id":5608639,"avatar_url":"https://avatars.githubusercontent.com/u/5608639?v=3","gravatar_id":"","url":"https://api.github.com/users/dima117","html_url":"https://github.com/dima117","followers_url":"https://api.github.com/users/dima117/followers","following_url":"https://api.github.com/users/dima117/following{/other_user}","gists_url":"https://api.github.com/users/dima117/gists{/gist_id}","starred_url":"https://api.github.com/users/dima117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima117/subscriptions","organizations_url":"https://api.github.com/users/dima117/orgs","repos_url":"https://api.github.com/users/dima117/repos","events_url":"https://api.github.com/users/dima117/events{/privacy}","received_events_url":"https://api.github.com/users/dima117/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T15:05:38Z","updated_at":"2016-02-14T15:05:38Z","body":"The error is fixed. Now the undefined value is perceived as zero."}}