PR Comment: Adding check for undefined and changing back file modes
authorJoseph Rossi <jrossi@optirtc.com>
Mon, 16 Nov 2015 20:48:06 +0000 (15:48 -0500)
committerJoseph Rossi <jrossi@optirtc.com>
Mon, 16 Nov 2015 20:49:29 +0000 (15:49 -0500)
auto_tests/tests/highlight_series_background.js [changed mode: 0755->0644]
auto_tests/tests/plugins_legend.js [changed mode: 0755->0644]
src/dygraph.js
src/plugins/legend.js

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index a5e326d..ee39383 100644 (file)
@@ -1815,7 +1815,7 @@ Dygraph.prototype.updateSelection_ = function(opt_animFraction) {
     ctx.save();
     for (i = 0; i < this.selPoints_.length; i++) {
       var pt = this.selPoints_[i];
-      if (isNaN(pt.canvasy) || pt.canvasy === null) continue;
+      if (isNaN(pt.canvasy) || pt.canvasy === null || pt.canvasy === undefined) continue;
 
       var circleSize = this.getNumericOption('highlightCircleSize', pt.name);
       var callback = this.getFunctionOption("drawHighlightPointCallback", pt.name);
index ab22fbb..9644576 100644 (file)
@@ -268,7 +268,7 @@ Legend.generateLegendHTML = function(g, x, sel_points, oneEmWidth, row) {
       var seriesData = labelToSeries[pt.name];
       seriesData.y = pt.yval;
 
-      if ((pt.yval === 0 && !showZeros) || isNaN(pt.canvasy) || pt.canvasy === null) {
+      if ((pt.yval === 0 && !showZeros) || isNaN(pt.canvasy) || pt.canvasy === null || pt.canvasy === undefined) {
         seriesData.isVisible = false;
         continue;
       }