1 | import { JSX } from '../jsx/jsx-namespace';
|
2 | import { ScaleConfig } from '@antv/scale';
|
3 | import Component from '../base/component';
|
4 | import Layout from '../base/layout';
|
5 | import Coord from '../coord';
|
6 | import ScaleController from '../controller/scale';
|
7 | interface Point {
|
8 | x: number;
|
9 | y: number;
|
10 | }
|
11 | export interface Props {
|
12 | zIndex?: number;
|
13 | data: any;
|
14 | scale?: any;
|
15 | coord?: any;
|
16 | start?: Point;
|
17 | end?: Point;
|
18 | children: any;
|
19 | }
|
20 | export interface ChartChildProps {
|
21 | data?: any;
|
22 | chart?: Chart;
|
23 | coord?: Coord;
|
24 | layout?: Layout;
|
25 | [k: string]: any;
|
26 | }
|
27 | interface IChart {
|
28 | props: Props;
|
29 | }
|
30 | export interface PositionLayout {
|
31 | position: 'top' | 'right' | 'bottom' | 'left';
|
32 | width: number;
|
33 | height: number;
|
34 | }
|
35 | export interface ComponentPosition {
|
36 | component: Component;
|
37 | layout: PositionLayout | PositionLayout[];
|
38 | }
|
39 | declare class Chart extends Component implements IChart {
|
40 | data: any;
|
41 | private layout;
|
42 | private coord;
|
43 | private componentsPosition;
|
44 | private layoutController;
|
45 | private coordController;
|
46 | private scaleController;
|
47 | scale: ScaleController;
|
48 | constructor(props: any, context?: any, updater?: any);
|
49 | willReceiveProps(nextProps: any, context: any): void;
|
50 | willUpdate(): void;
|
51 | private getStyle;
|
52 | layoutCoord(layout: PositionLayout): void;
|
53 | resetCoordLayout(): void;
|
54 | updateCoordLayout(layout: PositionLayout | PositionLayout[]): void;
|
55 | updateCoordFor(component: Component, layout: PositionLayout | PositionLayout[]): void;
|
56 | getGeometrys(): Component<any, any>[];
|
57 | /**
|
58 | * calculate dataset's position on canvas
|
59 | * @param {Object} record the dataset
|
60 | * @return {Object} return the position
|
61 | */
|
62 | getPosition(record: any): {
|
63 | x: any;
|
64 | y: any;
|
65 | };
|
66 | getSnapRecords(point: any, inCoordRange?: any): any;
|
67 | getLegendItems(point?: any): any;
|
68 | setScale(field: string, option: ScaleConfig): void;
|
69 | getScale(field: string): import("@antv/scale").Scale;
|
70 | getScales(): {
|
71 | [field: string]: import("@antv/scale").Scale;
|
72 | };
|
73 | getXScales(): any[];
|
74 | getYScales(): any[];
|
75 | getCoord(): Coord;
|
76 | filter(field: string, condition: any): void;
|
77 | _getRenderData(): any;
|
78 | render(): JSX.Element;
|
79 | }
|
80 | export default Chart;
|