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 | [key: string]: any;
|
78 | }
|
79 | export interface TooltipState {
|
80 | records: DataRecord[];
|
81 | }
|
82 | declare const _default: (View: any) => {
|
83 | new <IProps extends TooltipProps = TooltipProps>(props: IProps & ChartChildProps<import("../../chart/Data").DataRecord>): {
|
84 | updateCoord(): void;
|
85 | willMount(): void;
|
86 | didMount(): void;
|
87 | _initEvent(): void;
|
88 | willReceiveProps(nextProps: any): void;
|
89 | _initShow(): void;
|
90 | _showByData(dataItem: any): void;
|
91 | _triggerOn: (ev: any) => void;
|
92 | _triggerOff: () => void;
|
93 | show(point: any, _ev?: any): void;
|
94 | showSnapRecords(snapRecords: any): void;
|
95 | hide(): void;
|
96 | render(): import("@antv/f-engine").JSX.Element;
|
97 | props: IProps & ChartChildProps<import("../../chart/Data").DataRecord>;
|
98 | state: TooltipState;
|
99 | context: import("@antv/f-engine").IContext;
|
100 | refs: {
|
101 | [key: string]: Component<import("@antv/f-engine").IProps, import("@antv/f-engine").IState>;
|
102 | };
|
103 | |
104 |
|
105 |
|
106 | updater: import("@antv/f-engine/es/component/updater").Updater<TooltipState>;
|
107 | container: import("@antv/g-lite").Group;
|
108 | layout: import("@antv/f-engine").LayoutProps;
|
109 | children: import("@antv/f-engine/es/canvas/vnode").VNode | import("@antv/f-engine/es/canvas/vnode").VNode[];
|
110 | isMounted: boolean;
|
111 | animate: boolean;
|
112 | animator: import("@antv/f-engine/es/canvas/render/animator").default;
|
113 | destroyed: boolean;
|
114 | _vNode: import("@antv/f-engine/es/canvas/vnode").VNode; |
115 |
|
116 |
|
117 | shouldUpdate(_nextProps: IProps & ChartChildProps<import("../../chart/Data").DataRecord>): boolean;
|
118 | willUpdate(): void;
|
119 | didUpdate(): void;
|
120 | willUnmount(): void;
|
121 | didUnmount(): void;
|
122 | setState(partialState: TooltipState, callback?: () => void): void;
|
123 | forceUpdate(callback?: () => void): void;
|
124 | setAnimate(animate: boolean): void;
|
125 | destroy(): void;
|
126 | };
|
127 | };
|
128 | export default _default;
|