1 | import { ChartChildProps } from '../../chart';
|
2 | import Selection, { SelectionProps, SelectionState } from './selection';
|
3 | import { Adjust } from '../../deps/f2-adjust/src';
|
4 | import AttrController from '../../controller/attr';
|
5 | import { Scale } from '../../deps/f2-scale/src';
|
6 | import { AnimationProps } from '@antv/f-engine';
|
7 | import { AdjustType, AdjustProps } from './Adjust';
|
8 | import { DataRecord, DataField } from '../../chart/Data';
|
9 | export type GeometryType = 'line' | 'point' | 'area' | 'polygon' | 'schema' | 'interval';
|
10 | export interface ColorAttrObject {
|
11 | type?: string;
|
12 | field?: string;
|
13 | range?: any[];
|
14 | callback?: (...args: any[]) => any;
|
15 | scale?: any;
|
16 | }
|
17 | export interface SizeAttrObject {
|
18 | type?: string;
|
19 | field?: string;
|
20 | range?: any[];
|
21 | callback?: (...args: any[]) => any;
|
22 | scale?: any;
|
23 | }
|
24 | export interface ShapeAttrObject {
|
25 | type?: string;
|
26 | field?: string;
|
27 | range?: any[];
|
28 | callback?: (...args: any[]) => any;
|
29 | scale?: any;
|
30 | }
|
31 | export interface GeometryProps<TRecord extends DataRecord = DataRecord> extends SelectionProps {
|
32 | x: DataField<TRecord>;
|
33 | y: DataField<TRecord>;
|
34 | color?: DataField<TRecord> | string | [string, any[]] | ColorAttrObject;
|
35 | size?: DataField<TRecord> | number | string | [string, any[]] | SizeAttrObject;
|
36 | shape?: DataField<TRecord> | number | string | [string, any[]] | ShapeAttrObject;
|
37 | adjust?: AdjustType | AdjustProps;
|
38 | startOnZero?: boolean;
|
39 | style?: any;
|
40 | animation?: AnimationProps;
|
41 | |
42 |
|
43 |
|
44 | viewClip?: boolean;
|
45 | onPress?: Function;
|
46 | onPan?: Function;
|
47 | onPressStart?: Function;
|
48 | onPressEnd?: Function;
|
49 | onPanStart?: Function;
|
50 | onPanEnd?: Function;
|
51 | }
|
52 | declare class Geometry<TRecord extends DataRecord = DataRecord, P extends GeometryProps<TRecord> = GeometryProps<TRecord>, S extends SelectionState = SelectionState> extends Selection<P & ChartChildProps, S> {
|
53 | isGeometry: boolean;
|
54 | geomType: GeometryType;
|
55 | attrs: any;
|
56 | adjust: AdjustProps & {
|
57 | adjust: Adjust;
|
58 | };
|
59 | dataArray: any;
|
60 | dataRecords: any[];
|
61 | records: any[];
|
62 | mappedArray: any;
|
63 | justifyContent: boolean;
|
64 | startOnZero: boolean;
|
65 | connectNulls: boolean;
|
66 | sortable: boolean;
|
67 | attrController: AttrController;
|
68 | animation: AnimationProps;
|
69 | getDefaultCfg(): {};
|
70 | constructor(props: P & ChartChildProps, context?: any);
|
71 | getAttrOptions(props: any): {};
|
72 | willReceiveProps(nextProps: any): void;
|
73 | willMount(): void;
|
74 | willUpdate(): void;
|
75 | didMount(): void;
|
76 | _initEvent(): void;
|
77 | _createAttrs(): void;
|
78 | _getThemeAttrsRange(): {
|
79 | x: import("../../coord/types").Range;
|
80 | y: import("../../coord/types").Range;
|
81 | color: any;
|
82 | size: any;
|
83 | shape: any;
|
84 | };
|
85 | _createAdjust(): AdjustProps & {
|
86 | adjust: Adjust;
|
87 | };
|
88 | _adjustScales(): void;
|
89 | _groupData(data: any): any[];
|
90 | _saveOrigin(originData: any): any[];
|
91 | _numberic(data: any): void;
|
92 | _adjustData(records: any): any;
|
93 | _processData(): void;
|
94 | _readjustData(records: any): void;
|
95 | _sortData(records: any): void;
|
96 | getY0Value(): any;
|
97 | _getShapeStyle(shape: any, origin: any): any;
|
98 | |
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 | _mapping(records: any): any[];
|
106 | mapping(): any[];
|
107 | getClip(): {
|
108 | type: string;
|
109 | style: {
|
110 | x: number;
|
111 | y: number;
|
112 | width: number;
|
113 | height: number;
|
114 | };
|
115 | };
|
116 | getAttr(attrName: string): any;
|
117 | getXScale(): Scale;
|
118 | getYScale(): Scale;
|
119 | _getXSnap(invertPointX: any): any;
|
120 | _getYSnapRecords(invertPointY: any, records: any): any;
|
121 | _getXSnapRecords(invertPointX: any, records: any): any;
|
122 | flatRecords(): any;
|
123 | getSnapRecords(point: any, inCoordRange?: any): any[];
|
124 | getRecords(data: any, field?: string): any[];
|
125 | getLegendItems(): any;
|
126 | }
|
127 | export default Geometry;
|