(chart, {plugins, localIds}, options, all)
| 154 | } |
| 155 | |
| 156 | function createDescriptors(chart, {plugins, localIds}, options, all) { |
| 157 | const result = []; |
| 158 | const context = chart.getContext(); |
| 159 | |
| 160 | for (const plugin of plugins) { |
| 161 | const id = plugin.id; |
| 162 | const opts = getOpts(options[id], all); |
| 163 | if (opts === null) { |
| 164 | continue; |
| 165 | } |
| 166 | result.push({ |
| 167 | plugin, |
| 168 | options: pluginOpts(chart.config, {plugin, local: localIds[id]}, opts, context) |
| 169 | }); |
| 170 | } |
| 171 | |
| 172 | return result; |
| 173 | } |
| 174 | |
| 175 | function pluginOpts(config, {plugin, local}, opts, context) { |
| 176 | const keys = config.pluginScopeKeys(plugin); |
no test coverage detected