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 | declare class Canvas extends Component<ChartProps> {
|
23 | canvas: GCanvas;
|
24 | container: GCanvas;
|
25 | animation?: Animation;
|
26 | layout: Layout;
|
27 | theme: any;
|
28 | private _ee;
|
29 | constructor(props: ChartProps);
|
30 | renderComponents(components: Component[]): void;
|
31 | update(nextProps: ChartProps): void;
|
32 | resize(width?: any, height?: any): void;
|
33 | updateLayout(props: any): void;
|
34 | draw(): void;
|
35 | play(): void;
|
36 | render(): any;
|
37 | destroy(): void;
|
38 | on(type: string, listener: any): void;
|
39 | emit(type: string, event?: any): void;
|
40 | off(type: string, listener?: any): void;
|
41 | }
|
42 | export default Canvas;
|