Skip to content

Commit b42f9d1

Browse files
authored
Add events property to Plugin defined type (#11350)
1 parent 201ddff commit b42f9d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/types/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,12 @@ export declare const layouts: {
816816
export interface Plugin<TType extends ChartType = ChartType, O = AnyObject> extends ExtendedPlugin<TType, O> {
817817
id: string;
818818

819+
/**
820+
* The events option defines the browser events that the plugin should listen.
821+
* @default ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove']
822+
*/
823+
events?: (keyof HTMLElementEventMap)[]
824+
819825
/**
820826
* @desc Called when plugin is installed for this chart instance. This hook is also invoked for disabled plugins (options === false).
821827
* @param {Chart} chart - The chart instance.

0 commit comments

Comments
 (0)