From: Josh Kelley Date: Fri, 18 Apr 2025 11:15:57 +0000 (-0400) Subject: Add beforeEvent changed (#12063) X-Git-Tag: v4.5.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f46572e19a039792dae1553007dc7d38030c9eb1;p=thirdparty%2FChart.js.git Add beforeEvent changed (#12063) --- 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.