Skip to content

Commit f46572e

Browse files
authored
Add beforeEvent changed (#12063)
1 parent 74961d1 commit f46572e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/types/index.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1080,9 +1080,10 @@ export interface Plugin<TType extends ChartType = ChartType, O = AnyObject> exte
10801080
* @param {ChartEvent} args.event - The event object.
10811081
* @param {boolean} args.replay - True if this event is replayed from `Chart.update`
10821082
* @param {boolean} args.inChartArea - The event position is inside chartArea
1083+
* @param {boolean} [args.changed] - Set to true if the plugin needs a render. Should only be changed to true, because this args object is passed through all plugins.
10831084
* @param {object} options - The plugin options.
10841085
*/
1085-
beforeEvent?(chart: Chart<TType>, args: { event: ChartEvent, replay: boolean, cancelable: true, inChartArea: boolean }, options: O): boolean | void;
1086+
beforeEvent?(chart: Chart<TType>, args: { event: ChartEvent, replay: boolean, changed?: boolean; cancelable: true, inChartArea: boolean }, options: O): boolean | void;
10861087
/**
10871088
* @desc Called after the `event` has been consumed. Note that this hook
10881089
* will not be called if the `event` has been previously discarded.

0 commit comments

Comments
 (0)