From d7632efe65dde5deb2a19c01aa3d01d91458ef56 Mon Sep 17 00:00:00 2001 From: Nick Downie Date: Wed, 2 Jul 2014 21:09:04 +0100 Subject: [PATCH] Prevent spare datasets from breaking MultiTooltips --- src/Chart.Core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Chart.Core.js b/src/Chart.Core.js index fbec59c30..0bd5da268 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -873,7 +873,9 @@ yMin; helpers.each(this.datasets, function(dataset){ dataCollection = dataset.points || dataset.bars || dataset.segments; - Elements.push(dataCollection[dataIndex]); + if (dataCollection[dataIndex]){ + Elements.push(dataCollection[dataIndex]); + } }); helpers.each(Elements, function(element) { -- 2.47.2