DygraphLayout.prototype._evaluateLineCharts = function() {
// add all the rects
this.points = new Array();
+ // An array to keep track of how many points will be drawn for each set.
+ // This will allow for the canvas renderer to not have to check every point
+ // for every data set since the points are added in order of the sets in datasets
+ this.setPointsLengths = new Array();
+
for (var setName in this.datasets) {
if (!this.datasets.hasOwnProperty(setName)) continue;
var prevYPx = NaN;
var currXPx = NaN;
var currYPx = NaN;
+ var setPointsLength = 0;
// Ignore the pixel skipping optimization if there are error bars.
- var skip_opt = (this.attr_("errorBars") ||
+ // XXX 2011-07-25 temporarily disabled (see autotests/tests/selection.js)
+ var skip_opt = (true ||
+ this.attr_("errorBars") ||
this.attr_("customBars") ||
this.annotations.length > 0);
name: setName
};
this.points.push(point);
+ setPointsLength += 1;
}
prevXPx = currXPx;
prevYPx = currYPx;
}
+ this.setPointsLengths.push(setPointsLength);
}
};