Skip to content

Commit 1f5c427

Browse files
committed
add single option
1 parent b6b5ccb commit 1f5c427

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Diff for: src/components/fx/hover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function _hover(gd, evt, subplot, noHoverEvent, eventTarget) {
291291
}
292292

293293
// list of all overlaid subplots to look at
294-
if(plotinfo) {
294+
if(plotinfo && hoversubplots !== 'single') {
295295
var overlayedSubplots = plotinfo.overlays.map(function(pi) {
296296
return pi.id;
297297
});

Diff for: src/components/fx/layout_attributes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ module.exports = {
8080
},
8181
hoversubplots: {
8282
valType: 'enumerated',
83-
values: ['overlaying', 'axis'],
83+
values: ['single', 'overlaying', 'axis'],
8484
dflt: 'overlaying',
8585
editType: 'none',
8686
description: [
8787
'Determines expansion of hover effects to other subplots',
88+
'If *single* just the axis pair of the primary point is included without overlaying subplots.',
8889
'If *overlaying* all subplots using the main axis and occupying the same space are included.',
8990
'If *axis*, also include stacked subplots using the same axis',
9091
'when `hovermode` is set to *x*, *x unified*, *y* or *y unified*.',

Diff for: test/plot-schema.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2635,11 +2635,12 @@
26352635
]
26362636
},
26372637
"hoversubplots": {
2638-
"description": "Determines expansion of hover effects to other 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*.",
2638+
"description": "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*.",
26392639
"dflt": "overlaying",
26402640
"editType": "none",
26412641
"valType": "enumerated",
26422642
"values": [
2643+
"single",
26432644
"overlaying",
26442645
"axis"
26452646
]

0 commit comments

Comments
 (0)