text: string | string[];
}
-export type TooltipAlignment = 'start' | 'center' | 'end';
+export type TooltipXAlignment = 'left' | 'center' | 'right';
+export type TooltipYAlignment = 'top' | 'center' | 'bottom';
export interface TooltipModel<TType extends ChartType> {
// The items that we are rendering in the tooltip. See Tooltip Item Interface section
dataPoints: TooltipItem<TType>[];
// Positioning
- xAlign: TooltipAlignment;
- yAlign: TooltipAlignment;
+ xAlign: TooltipXAlignment;
+ yAlign: TooltipYAlignment;
// X and Y properties are the top left of the tooltip
x: number;
*/
enabled: Scriptable<boolean, ScriptableTooltipContext<TType>>;
/**
- * See custom tooltip section.
+ * See external tooltip section.
*/
- custom(this: TooltipModel<TType>, args: { chart: Chart; tooltip: TooltipModel<TType> }): void;
+ external(this: TooltipModel<TType>, args: { chart: Chart; tooltip: TooltipModel<TType> }): void;
/**
* The mode for positioning the tooltip
*/
/**
* Override the tooltip alignment calculations
*/
- xAlign: Scriptable<TooltipAlignment, ScriptableTooltipContext<TType>>;
- yAlign: Scriptable<TooltipAlignment, ScriptableTooltipContext<TType>>;
+ xAlign: Scriptable<TooltipXAlignment, ScriptableTooltipContext<TType>>;
+ yAlign: Scriptable<TooltipYAlignment, ScriptableTooltipContext<TType>>;
/**
* Sort tooltip items.