1 | import React from 'react';
|
2 | import { Chart } from '@antv/g2/lib/chart';
|
3 | import { TooltipCfg } from '@antv/g2/lib/interface';
|
4 | import './actions';
|
5 | export interface ITooltip extends TooltipCfg, React.ComponentProps<any> {
|
6 |
|
7 | visible?: boolean;
|
8 |
|
9 | children?: (title?: string, items?: any[], x?: number, y?: number) => {};
|
10 | [key: string]: any;
|
11 |
|
12 | triggerOn?: 'hover' | 'click';
|
13 |
|
14 | onShow?: (e?: ITooltipEvent, chart?: Chart) => void;
|
15 |
|
16 | onChange?: (e?: ITooltipEvent, chart?: Chart) => void;
|
17 |
|
18 | onHide?: (e?: ITooltipEvent, chart?: Chart) => void;
|
19 | }
|
20 | export interface ITooltipEvent {
|
21 | items: any[];
|
22 | title: string;
|
23 | x: number;
|
24 | y: number;
|
25 | }
|
26 | declare function Tooltip(props: ITooltip): React.JSX.Element;
|
27 | declare namespace Tooltip {
|
28 | var defaultProps: {
|
29 | showMarkers: boolean;
|
30 | triggerOn: string;
|
31 | };
|
32 | }
|
33 | export default Tooltip;
|