From: Dan Vanderkam Date: Tue, 15 Feb 2011 04:10:33 +0000 (-0500) Subject: Fix bug w/ annotations and raw format X-Git-Tag: v1.0.0~584^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=70a50f942ebb909cdc13fb1f455fb28598571c91;hp=a6a505d1759f087a1e29ad84fc8510aa4cbc4f6e;p=dygraphs.git Fix bug w/ annotations and raw format --- diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 8133d86..f463e39 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -32,9 +32,9 @@ DygraphLayout.prototype.addDataset = function(setname, set_xy) { DygraphLayout.prototype.setAnnotations = function(ann) { // The Dygraph object's annotations aren't parsed. We parse them here and - // save a copy. + // save a copy. If there is no parser, then the user must be using raw format. this.annotations = []; - var parse = this.attr_('xValueParser'); + 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) {