1 | import { Canvas as GCanvas } from '@antv/f2-graphic';
|
2 | import Component from '../base/component';
|
3 | import Layout from '../base/layout';
|
4 | import Animation from './animation';
|
5 | export interface ChartProps {
|
6 | context?: CanvasRenderingContext2D;
|
7 | pixelRatio?: number;
|
8 | width?: number | string;
|
9 | height?: number | string;
|
10 | padding?: number | string | (number | string)[];
|
11 | animate?: boolean;
|
12 | children?: any;
|
13 | px2hd?: any;
|
14 | theme?: any;
|
15 | style?: any;
|
16 | createImage?: () => HTMLImageElement;
|
17 | |
18 |
|
19 |
|
20 | landscape?: boolean;
|
21 | |
22 |
|
23 |
|
24 | onAfterDraw?: () => void;
|
25 | }
|
26 | declare class Canvas extends Component<ChartProps> {
|
27 | canvas: GCanvas;
|
28 | container: GCanvas;
|
29 | animation?: Animation;
|
30 | layout: Layout;
|
31 | theme: any;
|
32 | private _ee;
|
33 | constructor(props: ChartProps);
|
34 | renderComponents(components: Component[]): void;
|
35 | update(nextProps: ChartProps): void;
|
36 | resize(width?: any, height?: any): void;
|
37 | updateLayout(props: any): void;
|
38 | draw(): void;
|
39 | play(): void;
|
40 | render(): any;
|
41 | destroy(): void;
|
42 | on(type: string, listener: any): void;
|
43 | emit(type: string, event?: any): void;
|
44 | off(type: string, listener?: any): void;
|
45 | }
|
46 | export default Canvas;
|