From 70a50f942ebb909cdc13fb1f455fb28598571c91 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Mon, 14 Feb 2011 23:10:33 -0500 Subject: [PATCH] Fix bug w/ annotations and raw format --- dygraph-canvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.7.4