From f46572e19a039792dae1553007dc7d38030c9eb1 Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Fri, 18 Apr 2025 07:15:57 -0400 Subject: [PATCH] Add beforeEvent changed (#12063) --- src/types/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 175336ec7..898a2c821 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -1080,9 +1080,10 @@ export interface Plugin exte * @param {ChartEvent} args.event - The event object. * @param {boolean} args.replay - True if this event is replayed from `Chart.update` * @param {boolean} args.inChartArea - The event position is inside chartArea + * @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. * @param {object} options - The plugin options. */ - beforeEvent?(chart: Chart, args: { event: ChartEvent, replay: boolean, cancelable: true, inChartArea: boolean }, options: O): boolean | void; + beforeEvent?(chart: Chart, args: { event: ChartEvent, replay: boolean, changed?: boolean; cancelable: true, inChartArea: boolean }, options: O): boolean | void; /** * @desc Called after the `event` has been consumed. Note that this hook * will not be called if the `event` has been previously discarded. -- 2.47.3