Remove unnecessary numeric value checks.

The previous processing step already guarantees that the values are
numeric.
pull/1/head
David Schnur 13 years ago
parent 2a189b2cfb
commit d3a6bc965f

@ -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++;

Loading…
Cancel
Save