X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=0fc48cef97e2e07b5d2bc553bb362c2afda3af8b;hb=3641418e39983c35cef7ef5908ea2eda18b62492;hp=cf276ffd27c649302437bc276af6a03e1fe7e2cf;hpb=e71332d66382629c5014aa75d7c5f23b8686d9ff;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index cf276ff..0fc48ce 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2361,7 +2361,6 @@ Dygraph.prototype.drawGraph_ = function() { } this.computeYAxisRanges_(extremes); - console.log(extremes); this.layout_.setYAxes(this.axes_); this.addXTicks_(); @@ -2937,7 +2936,8 @@ Dygraph.prototype.parseFloat_ = function(x, opt_line_no, opt_line) { */ Dygraph.prototype.parseCSV_ = function(data) { var ret = []; - var lines = data.split("\n"); + var line_delimiter = Dygraph.detectLineDelimiter(data); + var lines = data.split(line_delimiter || "\n"); var vals, j; // Use the default delimiter or fall back to a tab if that makes sense. @@ -3293,7 +3293,8 @@ Dygraph.prototype.start_ = function() { this.predraw_(); } else if (typeof data == 'string') { // Heuristic: a newline means it's CSV data. Otherwise it's an URL. - if (data.indexOf('\n') >= 0) { + var line_delimiter = Dygraph.detectLineDelimiter(data); + if (line_delimiter) { this.loadedEvent_(data); } else { var req = new XMLHttpRequest();