From: Dan Vanderkam Date: Sun, 31 Jan 2010 03:41:08 +0000 (-0800) Subject: Fix Kenny's numeric gviz bug and add a test X-Git-Tag: v1.0.0~745 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=4440f6c8202461745a7e0d5977a990ef4fea1a9c;p=dygraphs.git Fix Kenny's numeric gviz bug and add a test --- diff --git a/dygraph.js b/dygraph.js index a08f668..ea25980 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1693,7 +1693,7 @@ Dygraph.prototype.parseDataTable_ = function(data) { cols = labels.length; var indepType = data.getColumnType(0); - if (indepType == 'date' || 'datetime') { + if (indepType == 'date' || indepType == 'datetime') { this.attrs_.xValueFormatter = Dygraph.dateString_; this.attrs_.xValueParser = Dygraph.dateParser; this.attrs_.xTicker = Dygraph.dateTicker; diff --git a/tests/numeric-gviz.html b/tests/numeric-gviz.html new file mode 100644 index 0000000..11457a8 --- /dev/null +++ b/tests/numeric-gviz.html @@ -0,0 +1,35 @@ + + + numeric gviz + + + + + + + + + + +

This tests that dygraphs can display gviz DataTable's with a numeric + x-axis.

+
+ +