stepPlot: false,
avoidMinZero: false,
+ // Sizes of the various chart labels.
+ titleHeight: 16,
+ xLabelHeight: 16,
+ yLabelWidth: 16,
+
interactionModel: null // will be set to Dygraph.defaultInteractionModel.
};
};
/**
- * Position the labels div so that its right edge is flush with the right edge
- * of the charting area.
+ * Position the labels div so that:
+ * - its right edge is flush with the right edge of the charting area
+ * - its top edge is flush with the top edge of the charting area
*/
Dygraph.prototype.positionLabelsDiv_ = function() {
// Don't touch a user-specified labelsDiv.
var area = this.plotter_.area;
var div = this.attr_("labelsDiv");
div.style.left = area.x + area.w - this.attr_("labelsDivWidth") - 1 + "px";
+ div.style.top = area.y + "px";
};
/**
seriesForAxis[idx].push(series);
}
+ // If no series are defined or visible then fill in some reasonable defaults.
+ if (seriesForAxis.length == 0) {
+ var axis = this.axes_[0];
+ axis.computedValueRange = [0, 1];
+ var ret =
+ Dygraph.numericTicks(axis.computedValueRange[0],
+ axis.computedValueRange[1],
+ this,
+ axis);
+ axis.ticks = ret.ticks;
+ this.numYDigits_ = ret.numDigits;
+ return;
+ }
+
// Compute extreme values, a span and tick marks for each axis.
for (var i = 0; i < this.axes_.length; i++) {
var axis = this.axes_[i];
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) ]);
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);
}