MCPcopy Create free account
hub / github.com/chartjs/Chart.js / _removeUnreferencedMetasets

Method _removeUnreferencedMetasets

src/core/core.controller.js:407–417  ·  view source on GitHub ↗

* @private

()

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

_destroyDatasetMetaMethod · 0.95

Tested by

no test coverage detected