From 7454418463735d68643ee25f112ec2e8288b859c Mon Sep 17 00:00:00 2001 From: Joseph Rossi Date: Mon, 16 Nov 2015 15:48:06 -0500 Subject: [PATCH] PR Comment: Adding check for undefined and changing back file modes --- auto_tests/tests/highlight_series_background.js | 0 auto_tests/tests/plugins_legend.js | 0 src/dygraph.js | 2 +- src/plugins/legend.js | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 auto_tests/tests/highlight_series_background.js mode change 100755 => 100644 auto_tests/tests/plugins_legend.js diff --git a/auto_tests/tests/highlight_series_background.js b/auto_tests/tests/highlight_series_background.js old mode 100755 new mode 100644 diff --git a/auto_tests/tests/plugins_legend.js b/auto_tests/tests/plugins_legend.js old mode 100755 new mode 100644 diff --git a/src/dygraph.js b/src/dygraph.js index a5e326d..ee39383 100644 --- a/src/dygraph.js +++ b/src/dygraph.js @@ -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); diff --git a/src/plugins/legend.js b/src/plugins/legend.js index ab22fbb..9644576 100644 --- a/src/plugins/legend.js +++ b/src/plugins/legend.js @@ -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; } -- 2.7.4