Add missing mouse events to CoreChartOptions.events type (#10124)

* add missing mouse events to CoreChartOptions.events type

* allow all html event names in CoreChartOptions.events
This commit is contained in:
Jérémy Morel 2022-02-09 13:45:30 +01:00 committed by GitHub
parent 7d3a1b874c
commit b1876a4b8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

15
types/index.esm.d.ts vendored
View File

@ -1493,20 +1493,7 @@ export interface CoreChartOptions<TType extends ChartType> extends ParsingOption
* The events option defines the browser events that the chart should listen to for tooltips and hovering.
* @default ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove']
*/
events: (
'mousemove' |
'mouseout' |
'click' |
'touchstart' |
'touchmove' |
'touchend' |
'pointerenter' |
'pointerdown' |
'pointermove' |
'pointerup' |
'pointerleave' |
'pointerout'
)[];
events: (keyof HTMLElementEventMap)[]
/**
* Called when any of the events fire. Passed the event, an array of active elements (bars, points, etc), and the chart.