mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
chart.js: add ChartOptions.onHover alias and amend type (#24740)
Present in 2.7 as per docs and code
This commit is contained in:
committed by
Mohamed Hegazy
parent
6a75839b6f
commit
00ca94db93
@@ -21,6 +21,9 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), {
|
||||
hover: {
|
||||
intersect: true
|
||||
},
|
||||
onHover(ev: MouseEvent, points: any[]) {
|
||||
return;
|
||||
},
|
||||
tooltips: {
|
||||
filter: data => Number(data.yLabel) > 0,
|
||||
intersect: true,
|
||||
|
||||
Vendored
+2
-1
@@ -184,6 +184,7 @@ declare namespace Chart {
|
||||
aspectRatio?: number;
|
||||
maintainAspectRatio?: boolean;
|
||||
events?: string[];
|
||||
onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any;
|
||||
onClick?(event?: MouseEvent, activeElements?: Array<{}>): any;
|
||||
title?: ChartTitleOptions;
|
||||
legend?: ChartLegendOptions;
|
||||
@@ -291,7 +292,7 @@ declare namespace Chart {
|
||||
mode?: string;
|
||||
animationDuration?: number;
|
||||
intersect?: boolean;
|
||||
onHover?(active: any): void;
|
||||
onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any;
|
||||
}
|
||||
|
||||
interface ChartAnimationObject {
|
||||
|
||||
Reference in New Issue
Block a user