* Helper function to traverse all of the visible elements in the chart * @param {Chart} chart - the chart * @param {function} handler - the callback to execute for each visible item
(chart, handler)
| 6729 | * @param {function} handler - the callback to execute for each visible item |
| 6730 | */ |
| 6731 | function parseVisibleItems(chart, handler) { |
| 6732 | var metasets = chart._getSortedVisibleDatasetMetas(); |
| 6733 | var metadata, i, j, ilen, jlen, element; |
| 6734 | |
| 6735 | for (i = 0, ilen = metasets.length; i < ilen; ++i) { |
| 6736 | metadata = metasets[i].data; |
| 6737 | for (j = 0, jlen = metadata.length; j < jlen; ++j) { |
| 6738 | element = metadata[j]; |
| 6739 | if (!element._view.skip) { |
| 6740 | handler(element); |
| 6741 | } |
| 6742 | } |
| 6743 | } |
| 6744 | } |
| 6745 | |
| 6746 | /** |
| 6747 | * Helper function to get the items that intersect the event position |
no test coverage detected