X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-layout.js;h=2b3d1376756247fdda52eb36b59e4d4f073441ad;hb=b5481aea020c5fa66baef26508671591527bd3df;hp=b99896b6343ab63418b3e2785cf957de985ee337;hpb=9bb94ee77258e463b963101d608ba0807ce069f4;p=dygraphs.git diff --git a/dygraph-layout.js b/dygraph-layout.js index b99896b..2b3d137 100644 --- a/dygraph-layout.js +++ b/dygraph-layout.js @@ -130,7 +130,8 @@ DygraphLayout.prototype.setAnnotations = function(ann) { 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) { + console.log(ann[i]); this.dygraph_.error("Annotations must have an 'x' property"); return; }