var barwidth = Math.min(Math.floor(r / cut), 12);
+ var tempVal = [];
+
for (var i = 0; i < len; i++){
- print(values[i]);
-
- maxvalue = (maxvalue > values[i] * 1) ? maxvalue : values[i] * 1;
+ maxvalue = (maxvalue > values[i]) ? maxvalue : values[i];
total += values[i];
if(i <= cut){
- values[i] = {
- value : values[i] * 1,
+ tempVal[i] = {
+ value : values[i],
order : i,
others : false,
valueOf: function () { return this.value; }
continue;
}
- values[cut].value += values[i] * 1;
- values[cut].others = true;
+ tempVal[cut].value += values[i] * 1;
+ tempVal[cut].others = true;
- values.splice(i, 1);
- continue;
}