[@types/chart.js] Added missing axis field to hover options (#43253)

* update test

* added missing axis field

* pr update
This commit is contained in:
tonybadguy
2020-03-30 17:16:40 -07:00
committed by GitHub
parent e37dc3fef0
commit a434bcf6ed
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -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[]) {
+2
View File
@@ -25,6 +25,7 @@
// Carlos Anoceto <https://github.com/canoceto>
// Nobuhiko Futagami <https://github.com/nobu222>
// Marco Ru <https://github.com/Marcoru97>
// Tony Liu <https://github.com/tonybadguy>
// 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;
}