projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c560c84
)
cleanup
author
Dan Vanderkam
<dan@dygraphs.com>
Wed, 18 Jul 2012 16:53:13 +0000
(11:53 -0500)
committer
Dan Vanderkam
<dan@dygraphs.com>
Wed, 18 Jul 2012 16:53:13 +0000
(11:53 -0500)
dygraph-canvas.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
a8b9807
..
fd74d5b
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-306,6
+306,7
@@
DygraphCanvasRenderer.prototype._drawSeries = function(
ctx.strokeStyle = color;
ctx.lineWidth = strokeWidth;
ctx.strokeStyle = color;
ctx.lineWidth = strokeWidth;
+ // NOTE: we break the iterator's encapsulation here for about a 25% speedup.
var arr = iter.array_;
var limit = iter.end_;
var predicate = iter.predicate_;
var arr = iter.array_;
var limit = iter.end_;
var predicate = iter.predicate_;
@@
-354,6
+355,8
@@
DygraphCanvasRenderer.prototype._drawSeries = function(
ctx.lineTo(point.canvasx, prevCanvasY);
prevCanvasX = point.canvasx;
}
ctx.lineTo(point.canvasx, prevCanvasY);
prevCanvasX = point.canvasx;
}
+
+ // TODO(danvk): this moveTo is rarely necessary
ctx.moveTo(prevCanvasX, prevCanvasY);
ctx.lineTo(point.canvasx, point.canvasy);
}
ctx.moveTo(prevCanvasX, prevCanvasY);
ctx.lineTo(point.canvasx, point.canvasy);
}
@@
-495,7
+498,6
@@
DygraphCanvasRenderer.prototype.drawErrorBars_ = function(points) {
continue;
}
continue;
}
- // TODO(danvk): here
if (stepPlot) {
newYs = [ point.y_bottom, point.y_top ];
prevY = point.y;
if (stepPlot) {
newYs = [ point.y_bottom, point.y_top ];
prevY = point.y;