From: Tanner Linsley Date: Mon, 2 Nov 2015 05:50:16 +0000 (-0700) Subject: Check if dataset is visible when adding active elements to a tooltip X-Git-Tag: 2.0.0-beta1~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1603%2Fhead;p=thirdparty%2FChart.js.git Check if dataset is visible when adding active elements to a tooltip --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 7ec01bad4..8c46fd4df 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -311,7 +311,9 @@ } helpers.each(this.data.datasets, function(dataset, dsIndex){ - elementsArray.push(dataset.metaData[found._index]); + if(helpers.isDatasetVisible(dataset)){ + elementsArray.push(dataset.metaData[found._index]); + } }, this); return elementsArray;