projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84fc6aa
)
Ensure step plots draw lines to the start of missing values.
author
Neal Nelson
<neal@makalumedia.com>
Thu, 17 Jun 2010 14:07:52 +0000
(16:07 +0200)
committer
Neal Nelson
<neal@makalumedia.com>
Thu, 17 Jun 2010 14:07:52 +0000
(16:07 +0200)
dygraph-canvas.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
2eb5ce1
..
3988b19
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-616,6
+616,15
@@
DygraphCanvasRenderer.prototype._renderLineChart = function() {
var point = points[j];
if (point.name == setName) {
if (!isOK(point.canvasy)) {
+ if (stepPlot) {
+ // Draw a horizontal line to the start of the missing data
+ ctx.beginPath();
+ ctx.strokeStyle = color;
+ ctx.lineWidth = this.options.strokeWidth;
+ ctx.moveTo(prevX, prevY);
+ ctx.lineTo(point.canvasx, prevY);
+ ctx.stroke();
+ }
// this will make us move to the next point, not draw a line to it.
prevX = prevY = null;
} else {