UNPKG

@visactor/react-vchart

Version:

The react version of VChart 4.x

15 lines (14 loc) 691 B
import { PropsWithChildren, ReactNode } from 'react'; import { BaseComponentProps } from '../BaseComponent'; import type { ITooltipSpec, ITooltipActual, TooltipHandlerParams } from '@visactor/vchart'; export type TooltipProps = PropsWithChildren<ITooltipSpec & IReactTooltipProps & BaseComponentProps>; export interface ITooltipRenderProps { tooltipElement: HTMLElement; actualTooltip: ITooltipActual; params: TooltipHandlerParams; } export type TooltipRender = (tooltipElement: HTMLElement, actualTooltip: ITooltipActual, params: TooltipHandlerParams) => ReactNode; export interface IReactTooltipProps { tooltipRender?: TooltipRender; reserveDefaultTooltip?: boolean; }