mh-two-thousand-and-two
2024-03-25 b8c93990f3fa5e50a8aca16bdc9c2758168aa0fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import type ExtensionAPI from '../../core/ExtensionAPI.js';
import type { TooltipOption } from './TooltipModel.js';
import Model from '../../model/Model.js';
import type { ZRColor } from '../../util/types.js';
interface TooltipContentOption {
    /**
     * Specify target container of the tooltip element.
     * Can either be an HTMLElement, CSS selector string, or a function that returns an HTMLElement.
     */
    appendTo: ((chartContainer: HTMLElement) => HTMLElement | undefined | null) | HTMLElement | string;
}
declare class TooltipHTMLContent {
    el: HTMLDivElement;
    private _api;
    private _container;
    private _show;
    private _styleCoord;
    private _enterable;
    private _zr;
    private _alwaysShowContent;
    private _hideTimeout;
    /**
     * Hide delay time
     */
    private _hideDelay;
    private _inContent;
    private _firstShow;
    private _longHide;
    /**
     * Record long-time hide
     */
    private _longHideTimeout;
    constructor(api: ExtensionAPI, opt: TooltipContentOption);
    /**
     * Update when tooltip is rendered
     */
    update(tooltipModel: Model<TooltipOption>): void;
    show(tooltipModel: Model<TooltipOption>, nearPointColor: ZRColor): void;
    setContent(content: string | HTMLElement | HTMLElement[], markers: unknown, tooltipModel: Model<TooltipOption>, borderColor?: ZRColor, arrowPosition?: TooltipOption['position']): void;
    setEnterable(enterable: boolean): void;
    getSize(): number[];
    moveTo(zrX: number, zrY: number): void;
    /**
     * when `alwaysShowContent` is true,
     * move the tooltip after chart resized
     */
    _moveIfResized(): void;
    hide(): void;
    hideLater(time?: number): void;
    isShow(): boolean;
    dispose(): void;
}
export default TooltipHTMLContent;