Skip to content

Commit b6b5ccb

Browse files
committed
revise attributes
1 parent b33e4dd commit b6b5ccb

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ function _hover(gd, evt, subplot, noHoverEvent, eventTarget) {
692692
gd._spikepoints = newspikepoints;
693693

694694
var sortHoverData = function() {
695-
if(!hoversubplots) {
695+
if(hoversubplots !== 'axis') {
696696
hoverData.sort(function(d1, d2) { return d1.distance - d2.distance; });
697697
}
698698

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,14 @@ module.exports = {
8080
},
8181
hoversubplots: {
8282
valType: 'enumerated',
83-
values: ['axis', false],
84-
dflt: false,
83+
values: ['overlaying', 'axis'],
84+
dflt: 'overlaying',
8585
editType: 'none',
8686
description: [
8787
'Determines expansion of hover effects to other subplots',
88-
'If *axis*, points from subplots linked to the axis of hovered subplot are included.',
89-
'Has an effect only when `hovermode` is set to *x*, *x unified*, *y* or *y unified*.',
88+
'If *overlaying* all subplots using the main axis and occupying the same space are included.',
89+
'If *axis*, also include stacked subplots using the same axis',
90+
'when `hovermode` is set to *x*, *x unified*, *y* or *y unified*.',
9091
].join(' ')
9192
},
9293
hoverdistance: {

Diff for: test/plot-schema.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -2635,13 +2635,13 @@
26352635
]
26362636
},
26372637
"hoversubplots": {
2638-
"description": "Determines expansion of hover effects to other subplots If *axis*, points from subplots linked to the axis of hovered subplot are included. Has an effect only when `hovermode` is set to *x*, *x unified*, *y* or *y unified*.",
2639-
"dflt": false,
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*.",
2639+
"dflt": "overlaying",
26402640
"editType": "none",
26412641
"valType": "enumerated",
26422642
"values": [
2643-
"axis",
2644-
false
2643+
"overlaying",
2644+
"axis"
26452645
]
26462646
},
26472647
"images": {

0 commit comments

Comments
 (0)