API REFERENCE

CartesianTooltipSpec

The CartesianTooltipSpec type declaration and related types. Optional fields are marked with ?.

Type declaration

typescript
export interface CartesianTooltipSpec {
  show: boolean;
  mode: CartesianTooltipMode;
  openMode?: CartesianTooltipOpenMode;
  trigger?: CartesianTooltipTrigger;
  side?: 'top' | 'right' | 'bottom' | 'left';
  offset?: number;
  format?: (value: number, context?: CartesianTooltipFormatContext) => string;
  html?: (value: number, context?: CartesianTooltipFormatContext) => string;
  className?: string;
  style?: CartesianTooltipStyle;
  width?: number | string;
  minWidth?: number | string;
  maxWidth?: number | string;
  padding?: number | string;
  interactive?: boolean;
  hideOnLeave?: boolean;
  connector?: CartesianTooltipConnectorSpec;
  draggable?: boolean;
}