diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index a4f68555123b6b..0ca3993778fd6a 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -639,6 +639,15 @@ export interface Layout { hovermode: "closest" | "x" | "y" | "x unified" | "y unified" | false; hoverdistance: number; hoverlabel: Partial; + /** + * Determines expansion of hover effects to other subplots. + * If "single" just the axis pair of the primary point is included without overlaying subplots. + * If "overlaying" all subplots using the main axis and occupying the same space are included. + * If "axis", also include stacked subplots using the same axis + * when `hovermode` is set to "x", "x unified", "y" or "y unified". + * @default "overlaying" + */ + hoversubplots: "single" | "overlaying" | "axis"; calendar: Calendar; // these are just the most common nested property updates that you might diff --git a/types/plotly.js/test/core-tests.ts b/types/plotly.js/test/core-tests.ts index 233b1ed8458c5b..483c06727a33d5 100644 --- a/types/plotly.js/test/core-tests.ts +++ b/types/plotly.js/test/core-tests.ts @@ -53,7 +53,8 @@ const layout = { datarevision: 0, editrevision: 0, selectionrevision: 0, -}; + hoversubplots: "overlaying", +} satisfies Partial; ////////////////////////////////////////////////////////////////////// // Plotly.newPlot diff --git a/types/plotly.js/v2/index.d.ts b/types/plotly.js/v2/index.d.ts index 3d9938c35b0caa..06d7465fa8d714 100644 --- a/types/plotly.js/v2/index.d.ts +++ b/types/plotly.js/v2/index.d.ts @@ -642,6 +642,15 @@ export interface Layout { hovermode: "closest" | "x" | "y" | "x unified" | "y unified" | false; hoverdistance: number; hoverlabel: Partial; + /** + * Determines expansion of hover effects to other subplots. + * If "single" just the axis pair of the primary point is included without overlaying subplots. + * If "overlaying" all subplots using the main axis and occupying the same space are included. + * If "axis", also include stacked subplots using the same axis + * when `hovermode` is set to "x", "x unified", "y" or "y unified". + * @default "overlaying" + */ + hoversubplots: "single" | "overlaying" | "axis"; calendar: Calendar; "xaxis.range": [Datum, Datum]; "xaxis.range[0]": Datum; diff --git a/types/plotly.js/v2/test/core-tests.ts b/types/plotly.js/v2/test/core-tests.ts index 4ced267064ad7b..ca730c92bc523e 100644 --- a/types/plotly.js/v2/test/core-tests.ts +++ b/types/plotly.js/v2/test/core-tests.ts @@ -49,7 +49,8 @@ const layout = { datarevision: 0, editrevision: 0, selectionrevision: 0, -}; + hoversubplots: "overlaying", +} satisfies Partial; ////////////////////////////////////////////////////////////////////// // Plotly.newPlot diff --git a/types/react-dom/canary.d.ts b/types/react-dom/canary.d.ts index 403466347a8071..1d65161ed1b530 100644 --- a/types/react-dom/canary.d.ts +++ b/types/react-dom/canary.d.ts @@ -65,6 +65,7 @@ declare module "react" { listener: EventListener, optionsOrUseCapture?: Parameters[2], ): void; + dispatchEvent(event: Event): boolean; scrollIntoView(alignToTop?: boolean): void; } }