X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=8858396e8d0cc2df9ea52cd3f973f4b7003f6c21;hb=f18986e594ec54f8402757b9c087f6a20d611b06;hp=23b68e4094b8ad3ad25b8fdc8d2fd1be7b812dee;hpb=c776c2165f2e3088e53f282e058cf1a8553decbb;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 23b68e4..8858396 100644 --- a/dygraph.js +++ b/dygraph.js @@ -570,7 +570,7 @@ Dygraph.prototype.createDragInterface_ = function() { dragStartX = getX(event); dragStartY = getY(event); - if (event.altKey) { + if (event.altKey || event.shiftKey) { if (!self.dateWindow_) return; // have to be zoomed in to pan. isPanning = true; dateRange = self.dateWindow_[1] - self.dateWindow_[0]; @@ -1645,7 +1645,13 @@ Dygraph.prototype.parseDataTable_ = function(data) { var ret = []; for (var i = 0; i < rows; i++) { var row = []; - if (!data.getValue(i, 0)) continue; + if (typeof(data.getValue(i, 0)) === 'undefined' || + data.getValue(i, 0) === null) { + this.warning("Ignoring row " + i + + " of DataTable because of undefined or null first column."); + continue; + } + if (indepType == 'date') { row.push(data.getValue(i, 0).getTime()); } else {