Debian Codegraph @

vendor/static/chart.js/dist/core/core.animator.d.ts

raw
1 /**
2 * @typedef { import('./core.animation.js').default } Animation
3 * @typedef { import('./core.controller.js').default } Chart
4 */
5 /**
6 * Please use the module's default export which provides a singleton instance
7 * Note: class is export for typedoc
8 */
9 export class Animator {
10 _request: any;
11 _charts: Map<any, any>;
12 _running: boolean;
13 _lastDate: number;
14 /**
15 * @private
16 */
17 private _notify;
18 /**
19 * @private
20 */
21 private _refresh;
22 /**
23 * @private
24 */
25 private _update;
26 /**
27 * @private
28 */
29 private _getAnims;
30 /**
31 * @param {Chart} chart
32 * @param {string} event - event name
33 * @param {Function} cb - callback
34 */
35 listen(chart: Chart, event: string, cb: Function): void;
36 /**
37 * Add animations
38 * @param {Chart} chart
39 * @param {Animation[]} items - animations
40 */
41 add(chart: Chart, items: Animation[]): void;
42 /**
43 * Counts number of active animations for the chart
44 * @param {Chart} chart
45 */
46 has(chart: Chart): boolean;
47 /**
48 * Start animating (all charts)
49 * @param {Chart} chart
50 */
51 start(chart: Chart): void;
52 running(chart: any): boolean;
53 /**
54 * Stop all animations for the chart
55 * @param {Chart} chart
56 */
57 stop(chart: Chart): void;
58 /**
59 * Remove chart from Animator
60 * @param {Chart} chart
61 */
62 remove(chart: Chart): boolean;
63 }
64 declare const _default: Animator;
65 export default _default;
66 export type Animation = import('./core.animation.js').default;
67 export type Chart = import('./core.controller.js').default;