// Compute the box which the chart should be drawn in. This is the canvas's
// box, less space needed for axis and chart labels.
+// NOTE: This should only be called by Dygraph.predraw_().
DygraphLayout.prototype.computePlotArea = function() {
var area = {
// TODO(danvk): per-axis setting.
var parse = this.attr_('xValueParser') || function(x) { return x; };
for (var i = 0; i < ann.length; i++) {
var a = {};
- if (!ann[i].xval && !ann[i].x) {
+ if (!ann[i].xval && ann[i].x === undefined) {
this.dygraph_.error("Annotations must have an 'x' property");
return;
}