projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #464 from danvk/sourcemap
[dygraphs.git]
/
dygraph-canvas.js
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
6bf5fbc
..
efcad10
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-52,7
+52,6
@@
var DygraphCanvasRenderer = function(dygraph, element, elementContext, layout) {
this.layout = layout;
this.element = element;
this.elementContext = elementContext;
this.layout = layout;
this.element = element;
this.elementContext = elementContext;
- this.container = this.element.parentNode;
this.height = this.element.height;
this.width = this.element.width;
this.height = this.element.height;
this.width = this.element.width;
@@
-64,8
+63,6
@@
var DygraphCanvasRenderer = function(dygraph, element, elementContext, layout) {
// internal state
this.area = layout.getPlotArea();
// internal state
this.area = layout.getPlotArea();
- this.container.style.position = "relative";
- this.container.style.width = this.width + "px";
// Set up a clipping area for the canvas (and the interaction canvas).
// This ensures that we don't overdraw.
// Set up a clipping area for the canvas (and the interaction canvas).
// This ensures that we don't overdraw.
@@
-562,7
+559,7
@@
DygraphCanvasRenderer._errorPlotter = function(e) {
var fillGraph = g.getBooleanOption("fillGraph", setName);
if (fillGraph) {
var fillGraph = g.getBooleanOption("fillGraph", setName);
if (fillGraph) {
-
Dygraph
.warn("Can't use fillGraph option with error bars");
+
console
.warn("Can't use fillGraph option with error bars");
}
var ctx = e.drawingContext;
}
var ctx = e.drawingContext;
@@
-716,7
+713,7
@@
DygraphCanvasRenderer._fillPlotter = function(e) {
var last_x, is_first = true;
while (iter.hasNext) {
var point = iter.next();
var last_x, is_first = true;
while (iter.hasNext) {
var point = iter.next();
- if (!Dygraph.isOK(point.y)) {
+ if (!Dygraph.isOK(point.y)
&& !stepPlot
) {
prevX = NaN;
if (point.y_stacked !== null && !isNaN(point.y_stacked)) {
baseline[point.canvasx] = area.h * point.y_stacked + area.y;
prevX = NaN;
if (point.y_stacked !== null && !isNaN(point.y_stacked)) {
baseline[point.canvasx] = area.h * point.y_stacked + area.y;
@@
-757,7
+754,11
@@
DygraphCanvasRenderer._fillPlotter = function(e) {
}
} else {
}
} else {
- newYs = [ point.canvasy, axisY ];
+ if (isNaN(point.canvasy) && stepPlot) {
+ newYs = [ area.y + area.h, axisY ];
+ } else {
+ newYs = [ point.canvasy, axisY ];
+ }
}
if (!isNaN(prevX)) {
ctx.moveTo(prevX, prevYs[0]);
}
if (!isNaN(prevX)) {
ctx.moveTo(prevX, prevYs[0]);