Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tooltip positioners and scriptable signature #8909

Merged
merged 1 commit into from Apr 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions types/index.esm.d.ts
Expand Up @@ -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> };
Expand Down Expand Up @@ -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[];
Expand Down