From d3a6bc965f386b213c5f3b76bfe2ed147e34b1bd Mon Sep 17 00:00:00 2001 From: David Schnur Date: Fri, 8 Feb 2013 19:48:51 -0500 Subject: [PATCH] Remove unnecessary numeric value checks. The previous processing step already guarantees that the values are numeric. --- jquery.flot.pie.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/jquery.flot.pie.js b/jquery.flot.pie.js index 544f367..b31919f 100644 --- a/jquery.flot.pie.js +++ b/jquery.flot.pie.js @@ -227,22 +227,11 @@ More detail and specific examples can be found in the included HTML file. // Calculate the total of all slices, so we can show percentages for (var i = 0; i < data.length; ++i) { - var item = parseFloat(data[i].data[0][1]); - if (item) { - total += item; - } + total += data[i].data[0][1]; } for (var i = 0; i < data.length; ++i) { - // make sure its a number - - data[i].data[0][1] = parseFloat(data[i].data[0][1]); - - if (!data[i].data[0][1]) { - data[i].data[0][1] = 0; - } - if (data[i].data[0][1] / total <= options.series.pie.combine.threshold) { combined += data[i].data[0][1]; numCombined++;