* Stop all animations for the chart * @param {Chart} chart
(chart)
| 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 |