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

Method stop

src/core/core.animator.js:189–202  ·  view source on GitHub ↗

* Stop all animations for the chart * @param {Chart} chart

(chart)

Source from the content-addressed store, hash-verified

187 * @param {Chart} chart
188 */
189 stop(chart) {
190 const anims = this._charts.get(chart);
191 if (!anims || !anims.items.length) {
192 return;
193 }
194 const items = anims.items;
195 let i = items.length - 1;
196
197 for (; i >= 0; --i) {
198 items[i].cancel();
199 }
200 anims.items = [];
201 this._notify(chart, anims, Date.now(), 'complete');
202 }
203
204 /**
205 * Remove chart from Animator

Callers

nothing calls this directly

Calls 3

_notifyMethod · 0.95
cancelMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected