- var i = 0;
- var setIdx;
-
- // Preallocating the size of points reduces reallocations, and therefore,
- // calls to collect garbage.
- var totalPoints = 0;
- for (setIdx = 0; setIdx < this.datasets.length; ++setIdx) {
- totalPoints += this.datasets[setIdx].length;
- }
- this.points = new Array(totalPoints);
-
- for (setIdx = 0; setIdx < this.datasets.length; ++setIdx) {
- this.setPointsOffsets.push(i);