mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Add events property to Plugin defined type (#11350)
This commit is contained in:
parent
201ddffa1d
commit
b42f9d127d
6
src/types/index.d.ts
vendored
6
src/types/index.d.ts
vendored
@ -816,6 +816,12 @@ export declare const layouts: {
|
||||
export interface Plugin<TType extends ChartType = ChartType, O = AnyObject> extends ExtendedPlugin<TType, O> {
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The events option defines the browser events that the plugin should listen.
|
||||
* @default ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove']
|
||||
*/
|
||||
events?: (keyof HTMLElementEventMap)[]
|
||||
|
||||
/**
|
||||
* @desc Called when plugin is installed for this chart instance. This hook is also invoked for disabled plugins (options === false).
|
||||
* @param {Chart} chart - The chart instance.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user