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