|
|
@ -40,6 +40,10 @@ GraphGroup.prototype.setItems = function(items) { |
|
|
|
if (this.options.sort == true) { |
|
|
|
this.itemsData.sort(function (a,b) {return a.x - b.x;}) |
|
|
|
} |
|
|
|
// typecast all items to numbers. Takes around 10ms for 500.000 items
|
|
|
|
for (var i = 0; i < this.itemsData.length; i++) { |
|
|
|
this.itemsData[i].y = Number(this.itemsData[i].y); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
this.itemsData = []; |
|
|
|