Skip to content

Commit

Permalink
Add events property to Plugin defined type (#11350)
Browse files Browse the repository at this point in the history
  • Loading branch information
stockiNail authored Jun 20, 2023
1 parent 201ddff commit b42f9d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b42f9d1

Please sign in to comment.