* @private
(method, args, typedRegistry)
| 122 | * @private |
| 123 | */ |
| 124 | _each(method, args, typedRegistry) { |
| 125 | [...args].forEach(arg => { |
| 126 | const reg = typedRegistry || this._getRegistryForType(arg); |
| 127 | if (typedRegistry || reg.isForType(arg) || (reg === this.plugins && arg.id)) { |
| 128 | this._exec(method, reg, arg); |
| 129 | } else { |
| 130 | // Handle loopable args |
| 131 | // Use case: |
| 132 | // import * as plugins from './plugins.js'; |
| 133 | // Chart.register(plugins); |
| 134 | each(arg, item => { |
| 135 | // If there are mixed types in the loopable, make sure those are |
| 136 | // registered in correct registry |
| 137 | // Use case: (treemap exporting controller, elements etc) |
| 138 | // import * as treemap from 'chartjs-chart-treemap.js'; |
| 139 | // Chart.register(treemap); |
| 140 | |
| 141 | const itemReg = typedRegistry || this._getRegistryForType(item); |
| 142 | this._exec(method, itemReg, item); |
| 143 | }); |
| 144 | } |
| 145 | }); |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * @private |
no test coverage detected