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