MCPcopy
hub / github.com/chartjs/Chart.js / createDescriptors

Function createDescriptors

src/core/core.plugins.js:156–173  ·  src/core/core.plugins.js::createDescriptors
(chart, {plugins, localIds}, options, all)

Source from the content-addressed store, hash-verified

154}
155
156function 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
175function pluginOpts(config, {plugin, local}, opts, context) {
176 const keys = config.pluginScopeKeys(plugin);

Callers 1

_createDescriptorsMethod · 0.85

Calls 3

getOptsFunction · 0.85
pluginOptsFunction · 0.85
getContextMethod · 0.45

Tested by

no test coverage detected