diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index 4f1b48017d..7382cebdf2 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -37,6 +37,9 @@ const chart: Chart = new Chart(ctx, { }, options: { hover: { + axis: 'xy', + mode: 'nearest', + animationDuration: 400, intersect: true, }, onHover(ev: MouseEvent, points: any[]) { diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 7f67fefaa9..dbdb2ad1ea 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -25,6 +25,7 @@ // Carlos Anoceto // Nobuhiko Futagami // Marco Ru +// Tony Liu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -442,6 +443,7 @@ declare namespace Chart { mode?: InteractionMode; animationDuration?: number; intersect?: boolean; + axis?: 'x' | 'y' | 'xy'; onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any; }