this.attrs_.xValueParser=Dygraph.dateParser;
this.attrs_.xTicker=Dygraph.dateTicker;
}else{
-if(_217!="number"){
+if(_217=="number"){
this.attrs_.xValueFormatter=function(x){
return x;
};
};
this.attrs_.xTicker=Dygraph.numericTicks;
}else{
-this.error("only 'date' and 'number' types are supported for column 1"+"of DataTable input (Got '"+_217+"')");
+this.error("only 'date' and 'number' types are supported for column 1 "+"of DataTable input (Got '"+_217+"')");
return null;
}
}
this.attrs_.xValueFormatter = Dygraph.dateString_;
this.attrs_.xValueParser = Dygraph.dateParser;
this.attrs_.xTicker = Dygraph.dateTicker;
- } else if (indepType != 'number') {
+ } else if (indepType == 'number') {
this.attrs_.xValueFormatter = function(x) { return x; };
this.attrs_.xValueParser = function(x) { return parseFloat(x); };
this.attrs_.xTicker = Dygraph.numericTicks;
} else {
- this.error("only 'date' and 'number' types are supported for column 1" +
+ this.error("only 'date' and 'number' types are supported for column 1 " +
"of DataTable input (Got '" + indepType + "')");
return null;
}
// var options = {showRowNumber: true};
var prefs = new _IG_Prefs(); // User preferences
chart.draw(data, {
- xValueParser: function(x) { return parseFloat(x); },
- xValueFormatter: function(x) { return x; },
- xTicker: DateGraph.prototype.numericTicks
});
};