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

Method _removeUnreferencedMetasets

src/core/core.controller.js:403–413  ·  src/core/core.controller.js::Chart._removeUnreferencedMetasets

* @private

()

Source from the content-addressed store, hash-verified

401 * @private
402 */
403 _removeUnreferencedMetasets() {
404 const {_metasets: metasets, data: {datasets}} = this;
405 if (metasets.length > datasets.length) {
406 delete this._stacks;
407 }
408 metasets.forEach((meta, index) => {
409 if (datasets.filter(x => x === meta._dataset).length === 0) {
410 this._destroyDatasetMeta(index);
411 }
412 });
413 }
414
415 buildOrUpdateControllers() {
416 const newControllers = [];

Callers 1

Calls 1

_destroyDatasetMetaMethod · 0.95

Tested by

no test coverage detected