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

Method _notifyStateChanges

src/core/core.plugins.js:113–119  ·  view source on GitHub ↗

* @param {Chart} chart * @private

(chart)

Source from the content-addressed store, hash-verified

111 * @private
112 */
113 _notifyStateChanges(chart) {
114 const previousDescriptors = this._oldCache || [];
115 const descriptors = this._cache;
116 const diff = (a, b) => a.filter(x => !b.some(y => x.plugin.id === y.plugin.id));
117 this._notify(diff(previousDescriptors, descriptors), chart, 'stop');
118 this._notify(diff(descriptors, previousDescriptors), chart, 'start');
119 }
120}
121
122/**

Callers 1

_descriptorsMethod · 0.95

Calls 1

_notifyMethod · 0.95

Tested by

no test coverage detected