1 | import { Component, TextStyleProps, RectStyleProps, LineStyleProps } from '@antv/f-engine';
|
2 | import { ChartChildProps } from '../../chart';
|
3 | export interface DataRecord {
|
4 | origin: any;
|
5 | [k: string]: any;
|
6 | }
|
7 | export interface TooltipProps {
|
8 | |
9 |
|
10 |
|
11 | visible?: boolean;
|
12 | |
13 |
|
14 |
|
15 | padding?: string;
|
16 | |
17 |
|
18 |
|
19 | triggerOn?: 'press' | 'click';
|
20 | |
21 |
|
22 |
|
23 | triggerOff?: 'pressend';
|
24 | |
25 |
|
26 |
|
27 | alwaysShow?: boolean;
|
28 | |
29 |
|
30 |
|
31 | showCrosshairs?: boolean;
|
32 | |
33 |
|
34 |
|
35 | crosshairsType?: 'x' | 'y' | 'xy';
|
36 | |
37 |
|
38 |
|
39 | crosshairsStyle?: LineStyleProps;
|
40 | |
41 |
|
42 |
|
43 | snap?: boolean;
|
44 | |
45 |
|
46 |
|
47 | nameStyle?: TextStyleProps;
|
48 | |
49 |
|
50 |
|
51 | valueStyle?: TextStyleProps;
|
52 | |
53 |
|
54 |
|
55 | background?: RectStyleProps;
|
56 | |
57 |
|
58 |
|
59 | showItemMarker?: boolean;
|
60 | defaultItem?: any;
|
61 | custom?: boolean;
|
62 | tooltipMarkerStyle?: any;
|
63 | onChange?: any;
|
64 | showXTip?: boolean;
|
65 | |
66 |
|
67 |
|
68 | xPositionType?: 'record' | 'coord';
|
69 | showYTip?: boolean;
|
70 | |
71 |
|
72 |
|
73 | yPositionType?: 'record' | 'coord';
|
74 | showTooltipMarker?: boolean;
|
75 | customText?: any;
|
76 | markerBackgroundStyle?: any;
|
77 | }
|
78 | export interface TooltipState {
|
79 | records: DataRecord[];
|
80 | }
|
81 | declare const _default: (View: any) => {
|
82 | new <IProps extends TooltipProps = TooltipProps>(props: IProps & ChartChildProps<import("../../chart/Data").DataRecord>): {
|
83 | updateCoord(): void;
|
84 | willMount(): void;
|
85 | didMount(): void;
|
86 | _initEvent(): void;
|
87 | willReceiveProps(nextProps: any): void;
|
88 | _initShow(): void;
|
89 | _showByData(dataItem: any): void;
|
90 | _triggerOn: (ev: any) => void;
|
91 | _triggerOff: () => void;
|
92 | show(point: any, _ev?: any): void;
|
93 | showSnapRecords(snapRecords: any): void;
|
94 | hide(): void;
|
95 | render(): import("@antv/f-engine").JSX.Element;
|
96 | props: IProps & ChartChildProps<import("../../chart/Data").DataRecord>;
|
97 | state: TooltipState;
|
98 | context: import("@antv/f-engine").IContext;
|
99 | refs: {
|
100 | [key: string]: Component<import("@antv/f-engine").IProps, import("@antv/f-engine").IState>;
|
101 | };
|
102 | |
103 |
|
104 |
|
105 | updater: import("@antv/f-engine/es/component/updater").Updater<TooltipState>;
|
106 | container: import("@antv/g-lite").Group;
|
107 | layout: import("@antv/f-engine").LayoutProps;
|
108 | children: import("@antv/f-engine/es/canvas/vnode").VNode | import("@antv/f-engine/es/canvas/vnode").VNode[];
|
109 | isMounted: boolean;
|
110 | animate: boolean;
|
111 | animator: import("@antv/f-engine/es/canvas/render/animator").default;
|
112 | destroyed: boolean;
|
113 | _vNode: import("@antv/f-engine/es/canvas/vnode").VNode; |
114 |
|
115 |
|
116 | shouldUpdate(_nextProps: IProps & ChartChildProps<import("../../chart/Data").DataRecord>): boolean;
|
117 | willUpdate(): void;
|
118 | didUpdate(): void;
|
119 | willUnmount(): void;
|
120 | didUnmount(): void;
|
121 | setState(partialState: TooltipState, callback?: () => void): void;
|
122 | forceUpdate(callback?: () => void): void;
|
123 | setAnimate(animate: boolean): void;
|
124 | destroy(): void;
|
125 | };
|
126 | };
|
127 | export default _default;
|