]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Check if dataset is visible when adding active elements to a tooltip 1603/head
authorTanner Linsley <tannerlinsley@gmail.com>
Mon, 2 Nov 2015 05:50:16 +0000 (22:50 -0700)
committerTanner Linsley <tannerlinsley@gmail.com>
Mon, 2 Nov 2015 05:50:16 +0000 (22:50 -0700)
src/core/core.controller.js

index 7ec01bad44b52c0e1ae04b20616b4f0ce06e96ad..8c46fd4dfa5700b17ffecb8dd0609e55d514c19a 100644 (file)
                        }
 
                        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;