Skip to content

Commit

Permalink
fix gviz-numeric test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Vanderkam committed Mar 19, 2011
1 parent 1eb2feb commit 92fd68d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dygraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -3254,6 +3254,11 @@ Dygraph.prototype.parseDataTable_ = function(data) {
annotations.push(ann);
}
}

// Strip out infinities, which give dygraphs problems later on.
for (var j = 0; j < row.length; j++) {
if (!isFinite(row[j])) row[j] = null;
}
} else {
for (var j = 0; j < cols - 1; j++) {
row.push([ data.getValue(i, 1 + 2 * j), data.getValue(i, 2 + 2 * j) ]);
Expand All @@ -3262,11 +3267,6 @@ Dygraph.prototype.parseDataTable_ = function(data) {
if (ret.length > 0 && row[0] < ret[ret.length - 1][0]) {
outOfOrder = true;
}

// Strip out infinities, which give dygraphs problems later on.
for (var j = 0; j < row.length; j++) {
if (!isFinite(row[j])) row[j] = null;
}
ret.push(row);
}

Expand Down

0 comments on commit 92fd68d

Please sign in to comment.