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 #250 from wimme/patch-4
[dygraphs.git]
/
dygraph.js
diff --git
a/dygraph.js
b/dygraph.js
index
4ab7539
..
dc3b798
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-1051,7
+1051,7
@@
Dygraph.prototype.resizeElements_ = function() {
this.canvas_.height = this.height_;
this.canvas_.style.width = this.width_ + "px"; // for IE
this.canvas_.style.height = this.height_ + "px"; // for IE
this.canvas_.height = this.height_;
this.canvas_.style.width = this.width_ + "px"; // for IE
this.canvas_.style.height = this.height_ + "px"; // for IE
-}
+}
;
/**
* Detach DOM elements in the dygraph and null out all data references.
/**
* Detach DOM elements in the dygraph and null out all data references.
@@
-1371,7
+1371,7
@@
Dygraph.prototype.createDragInterface_ = function() {
context.tarp.uncover();
};
context.tarp.uncover();
};
- this.addAndTrackEvent(document, 'mouseup',
this.
mouseUpHandler);
+ this.addAndTrackEvent(document, 'mouseup', mouseUpHandler);
};
/**
};
/**
@@
-2484,7
+2484,6
@@
Dygraph.prototype.drawGraph_ = function() {
// Save the X axis zoomed status as the updateOptions call will tend to set it erroneously
var tmp_zoomed_x = this.zoomed_x_;
// Tell PlotKit to use this new data and render itself
// Save the X axis zoomed status as the updateOptions call will tend to set it erroneously
var tmp_zoomed_x = this.zoomed_x_;
// Tell PlotKit to use this new data and render itself
- this.layout_.setDateWindow(this.dateWindow_);
this.zoomed_x_ = tmp_zoomed_x;
this.layout_.evaluateWithError();
this.renderGraph_(is_initial_draw);
this.zoomed_x_ = tmp_zoomed_x;
this.layout_.evaluateWithError();
this.renderGraph_(is_initial_draw);
@@
-2825,12
+2824,20
@@
Dygraph.prototype.extractSeries_ = function(rawData, i, logScale) {
if (logScale) {
// On the log scale, points less than zero do not exist.
// This will create a gap in the chart.
if (logScale) {
// On the log scale, points less than zero do not exist.
// This will create a gap in the chart.
- if (point <= 0) {
+ if (errorBars || customBars) {
+ // point.length is either 2 (errorBars) or 3 (customBars)
+ for (var k = 0; k < point.length; k++) {
+ if (point[k] <= 0) {
+ point = null;
+ break;
+ }
+ }
+ } else if (point <= 0) {
point = null;
}
}
// Fix null points to fit the display type standard.
point = null;
}
}
// Fix null points to fit the display type standard.
- if(point !== null) {
+ if
(point !== null) {
series.push([x, point]);
} else {
series.push([x, errorBars ? [null, null] : customBars ? [null, null, null] : point]);
series.push([x, point]);
} else {
series.push([x, errorBars ? [null, null] : customBars ? [null, null, null] : point]);