* Returns visible dataset metas that are attached to this scale * @param {string} [type] - if specified, also filter by dataset type * @return {object[]}
(type)
| 1678 | * @return {object[]} |
| 1679 | */ |
| 1680 | getMatchingVisibleMetas(type) { |
| 1681 | const metas = this.chart.getSortedVisibleDatasetMetas(); |
| 1682 | const axisID = this.axis + 'AxisID'; |
| 1683 | const result = []; |
| 1684 | let i, ilen; |
| 1685 | |
| 1686 | for (i = 0, ilen = metas.length; i < ilen; ++i) { |
| 1687 | const meta = metas[i]; |
| 1688 | if (meta[axisID] === this.id && (!type || meta.type === type)) { |
| 1689 | result.push(meta); |
| 1690 | } |
| 1691 | } |
| 1692 | return result; |
| 1693 | } |
| 1694 | |
| 1695 | /** |
| 1696 | * @param {number} index |
no test coverage detected