From 240f3d6bab9f8d4f11743855b0d1dd4fb4495c66 Mon Sep 17 00:00:00 2001 From: Shurong Cao <170531907+CAOShurong@users.noreply.github.com> Date: Tue, 25 Aug 2026 01:44:38 +0800 Subject: [PATCH 1/6] docs: correct showspikes hovermode description The description claimed showspikes only takes effect when hovermode is 'closest'. In fact spikes are also drawn in 'x', 'y', 'x unified' and 'y unified' hovermodes: hover.js filters hoverData by ax.showspikes regardless of which cartesian hovermode is active (src/components/fx/hover.js, second spike-point block). The repo's own test suite asserts spikelines render with hovermode 'x' (test/jasmine/tests/hover_spikeline_test.js). Replaces the incorrect note with an accurate per-hovermode description. Fixes part of #7595. --- src/plots/cartesian/layout_attributes.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index d7c207fd21f..a601e41cf5f 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -780,7 +780,9 @@ module.exports = { editType: 'modebar', description: [ 'Determines whether or not spikes (aka droplines) are drawn for this axis.', - 'Note: This only takes affect when hovermode = closest' + 'In *closest* hovermode, spikes are only drawn when hovering near a data point.', + 'In *x*, *y*, *x unified*, and *y unified* hovermodes, spikes are also', + 'drawn at the current cursor position on the axis.' ].join(' ') }, spikecolor: { From 52d8881594451afa564d087f1ee1327fe9d4157b Mon Sep 17 00:00:00 2001 From: Shurong Cao <170531907+CAOShurong@users.noreply.github.com> Date: Tue, 25 Aug 2026 01:46:24 +0800 Subject: [PATCH 2/6] docs: add draftlog entry for showspikes description fix --- draftlogs/7981_change.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 draftlogs/7981_change.md diff --git a/draftlogs/7981_change.md b/draftlogs/7981_change.md new file mode 100644 index 00000000000..eda0dcab028 --- /dev/null +++ b/draftlogs/7981_change.md @@ -0,0 +1 @@ + - Correct the `showspikes` axis attribute description: spikes are not limited to *closest* hovermode, they also render in *x*, *y*, and unified hovermodes [[#7981](https://github.com/plotly/plotly.js/pull/7981)] From 2db75da8cd9f173a51a58481a773bca21a525f4a Mon Sep 17 00:00:00 2001 From: Shurong Cao Date: Tue, 25 Aug 2026 02:13:54 +0800 Subject: [PATCH 3/6] docs: regenerate test/plot-schema.json for showspikes description change Signed-off-by: Shurong Cao --- test/plot-schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plot-schema.json b/test/plot-schema.json index 0412ea47de0..6495ae7e5a3 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -13953,7 +13953,7 @@ "valType": "boolean" }, "showspikes": { - "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note: This only takes affect when hovermode = closest", + "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. In *closest* hovermode, spikes are only drawn when hovering near a data point. In *x*, *y*, *x unified*, and *y unified* hovermodes, spikes are also drawn at the current cursor position on the axis.", "dflt": false, "editType": "modebar", "valType": "boolean" @@ -15202,7 +15202,7 @@ "valType": "boolean" }, "showspikes": { - "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note: This only takes affect when hovermode = closest", + "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. In *closest* hovermode, spikes are only drawn when hovering near a data point. In *x*, *y*, *x unified*, and *y unified* hovermodes, spikes are also drawn at the current cursor position on the axis.", "dflt": false, "editType": "modebar", "valType": "boolean" From 224ba86880b1f7c95d013f5dfb0543ff2967b5ba Mon Sep 17 00:00:00 2001 From: Shurong Cao <170531907+CAOShurong@users.noreply.github.com> Date: Fri, 28 Aug 2026 03:50:44 +0800 Subject: [PATCH 4/6] docs: align showspikes description with hovermode behavior --- draftlogs/7981_change.md | 2 +- src/plots/cartesian/layout_attributes.js | 4 +--- test/plot-schema.json | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/draftlogs/7981_change.md b/draftlogs/7981_change.md index eda0dcab028..ae85849793b 100644 --- a/draftlogs/7981_change.md +++ b/draftlogs/7981_change.md @@ -1 +1 @@ - - Correct the `showspikes` axis attribute description: spikes are not limited to *closest* hovermode, they also render in *x*, *y*, and unified hovermodes [[#7981](https://github.com/plotly/plotly.js/pull/7981)] + - Correct the `showspikes` axis attribute description: clarify that spikes are never drawn when `hovermode` is *false* [[#7981](https://github.com/plotly/plotly.js/pull/7981)] diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index a601e41cf5f..8d534a846a1 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -780,9 +780,7 @@ module.exports = { editType: 'modebar', description: [ 'Determines whether or not spikes (aka droplines) are drawn for this axis.', - 'In *closest* hovermode, spikes are only drawn when hovering near a data point.', - 'In *x*, *y*, *x unified*, and *y unified* hovermodes, spikes are also', - 'drawn at the current cursor position on the axis.' + 'Note that spikes will never be drawn when `hovermode` is *false*.' ].join(' ') }, spikecolor: { diff --git a/test/plot-schema.json b/test/plot-schema.json index 6495ae7e5a3..d54e9dfeee3 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -13953,7 +13953,7 @@ "valType": "boolean" }, "showspikes": { - "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. In *closest* hovermode, spikes are only drawn when hovering near a data point. In *x*, *y*, *x unified*, and *y unified* hovermodes, spikes are also drawn at the current cursor position on the axis.", + "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note that spikes will never be drawn when `hovermode` is *false*.", "dflt": false, "editType": "modebar", "valType": "boolean" @@ -15202,7 +15202,7 @@ "valType": "boolean" }, "showspikes": { - "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. In *closest* hovermode, spikes are only drawn when hovering near a data point. In *x*, *y*, *x unified*, and *y unified* hovermodes, spikes are also drawn at the current cursor position on the axis.", + "description": "Determines whether or not spikes (aka droplines) are drawn for this axis. Note that spikes will never be drawn when `hovermode` is *false*.", "dflt": false, "editType": "modebar", "valType": "boolean" @@ -85930,4 +85930,4 @@ "type": "waterfall" } } -} \ No newline at end of file +} From d5f9474b656b194b9998fb5a6ebc069de271bd1c Mon Sep 17 00:00:00 2001 From: Shurong Cao <170531907+CAOShurong@users.noreply.github.com> Date: Fri, 28 Aug 2026 04:00:11 +0800 Subject: [PATCH 5/6] docs: update generated showspikes types --- src/types/generated/schema.d.ts | 2 +- test/plot-schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/generated/schema.d.ts b/src/types/generated/schema.d.ts index b01d6d9185c..2c08fa0db33 100644 --- a/src/types/generated/schema.d.ts +++ b/src/types/generated/schema.d.ts @@ -12534,7 +12534,7 @@ export interface LayoutAxis { */ showline?: boolean; /** - * Determines whether or not spikes (aka droplines) are drawn for this axis. Note: This only takes affect when hovermode = closest + * Determines whether or not spikes (aka droplines) are drawn for this axis. Note that spikes will never be drawn when `hovermode` is *false*. * @default false */ showspikes?: boolean; diff --git a/test/plot-schema.json b/test/plot-schema.json index d54e9dfeee3..4598de7f54c 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -85930,4 +85930,4 @@ "type": "waterfall" } } -} +} \ No newline at end of file From 77fc50325c3b5d7e26465196cca2a675120531f1 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:06:52 -0400 Subject: [PATCH 6/6] update draftlog --- draftlogs/7981_change.md | 1 - draftlogs/7981_fix.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 draftlogs/7981_change.md create mode 100644 draftlogs/7981_fix.md diff --git a/draftlogs/7981_change.md b/draftlogs/7981_change.md deleted file mode 100644 index ae85849793b..00000000000 --- a/draftlogs/7981_change.md +++ /dev/null @@ -1 +0,0 @@ - - Correct the `showspikes` axis attribute description: clarify that spikes are never drawn when `hovermode` is *false* [[#7981](https://github.com/plotly/plotly.js/pull/7981)] diff --git a/draftlogs/7981_fix.md b/draftlogs/7981_fix.md new file mode 100644 index 00000000000..9a8d516209a --- /dev/null +++ b/draftlogs/7981_fix.md @@ -0,0 +1 @@ +- Correct the `showspikes` axis attribute description to clarify that it applies for all `hovermode` values except when `hovermode` is *false* [[#7981](https://github.com/plotly/plotly.js/pull/7981)], with thanks for @CAOShurong for the contribution!