mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-02-01 17:47:09 +00:00
Fix tooltip positioners and scriptable signature (#8909)
This commit is contained in:
parent
be7a2ce69e
commit
aee45c611e
4
types/index.esm.d.ts
vendored
4
types/index.esm.d.ts
vendored
@ -31,7 +31,7 @@ export interface ScriptableLineSegmentContext {
|
||||
p1: PointElement
|
||||
}
|
||||
|
||||
export type Scriptable<T, TContext> = T | ((ctx: TContext) => T);
|
||||
export type Scriptable<T, TContext> = T | ((ctx: TContext, options: AnyObject) => T);
|
||||
export type ScriptableOptions<T, TContext> = { [P in keyof T]: Scriptable<T[P], TContext> };
|
||||
export type ScriptableAndArray<T, TContext> = readonly T[] | Scriptable<T, TContext>;
|
||||
export type ScriptableAndArrayOptions<T, TContext> = { [P in keyof T]: ScriptableAndArray<T[P], TContext> };
|
||||
@ -2331,7 +2331,7 @@ export interface TooltipModel<TType extends ChartType> {
|
||||
|
||||
export const Tooltip: Plugin & {
|
||||
readonly positioners: {
|
||||
[key: string]: (items: readonly Element[], eventPosition: { x: number; y: number }) => { x: number; y: number } | false;
|
||||
[key: string]: (items: readonly ActiveElement[], eventPosition: { x: number; y: number }) => { x: number; y: number } | false;
|
||||
};
|
||||
|
||||
getActiveElements(): ActiveElement[];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user