From: Nick Downie Date: Wed, 2 Jul 2014 20:09:04 +0000 (+0100) Subject: Prevent spare datasets from breaking MultiTooltips X-Git-Tag: v1.0.1-beta.2~6^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F413%2Fhead;p=thirdparty%2FChart.js.git Prevent spare datasets from breaking MultiTooltips --- 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) {