this.wilsonInterval_ = attrs.wilsonInterval || true;
this.customBars_ = attrs.customBars || false;
+ // Clear the div. This ensure that, if multiple dygraphs are passed the same
+ // div, then only one will be drawn.
+ div.innerHTML = "";
+
// If the div isn't already sized then give it a default size.
if (div.style.width == '') {
div.style.width = Dygraph.DEFAULT_WIDTH + "px";
var ret = [];
for (var i = 0; i < rows; i++) {
var row = [];
+ if (!data.getValue(i, 0)) continue;
if (indepType == 'date') {
row.push(data.getValue(i, 0).getTime());
} else {
row.push(data.getValue(i, 0));
}
+ var any_data = false;
for (var j = 1; j < cols; j++) {
row.push(data.getValue(i, j));
+ if (data.getValue(i, j)) any_data = true;
}
- ret.push(row);
+ if (any_data) ret.push(row);
}
return ret;
}