/** * @doc: https://api.highcharts.com/highcharts/tooltip */ import { CSSObject } from 'highcharts'; import Point from '../../klasses/point'; import Series from '../../klasses/series'; import { ChartOptions } from '.'; import { UnitHumanizeNumFn } from './unit'; export interface TooltipFormatterContextObject { color: string; colorIndex?: number; key: number; point: Point; points?: TooltipFormatterContextObject[]; series: Series; x: number; y: number; } export declare type ToolTipPointDataObject = { name: string; value: number; color: string; index: number; /** 带样式的小圆点 html 字符串 */ pointDot: string; /** 当前项所占的百分比 */ percentage?: number; }; export declare type TooltipOptions = { /** * When the tooltip is shared, the entire plot area will capture mouse movement or touch events. * * Tooltip texts for series types with ordered data (not pie, scatter, flags etc) will be shown in a single bubble. * * This is recommended for single series charts and for tablet/mobile optimized charts. */ shared?: boolean; /** * The format for the date in the tooltip * header if the X axis is a datetime axis. The default is a best guess * based on the smallest distance between points in the chart. */ xDateFormat?: string; /** * CSS styles for the tooltip. */ style?: CSSObject; /** * Callback function for formatting the HTML output for a single point in the tooltip */ customFormatter?: (pointData: ToolTipPointDataObject, humanizeNum: UnitHumanizeNumFn) => string; }; export declare function createHighTooltipOptions(options?: TooltipOptions, chartOptions?: ChartOptions, isMap?: boolean): Highcharts.TooltipOptions;