There was an error while loading. Please reload this page.
1 parent d5d3712 commit 3747e72Copy full SHA for 3747e72
1 file changed
src/components/fx/hover.js
@@ -1087,7 +1087,17 @@ function createHoverText(hoverData, opts) {
1087
(outerTop - tbb.top + HOVERARROWSIZE + HOVERTEXTPAD)));
1088
1089
lx = xa._offset + (c0.x0 + c0.x1) / 2;
1090
- ly = ya._offset + (xa.side === 'top' ? 0 : ya._length);
+
1091
+ // show the common label at the bottom subplot if hoversubplots is set to axis
1092
+ if (fullLayout.hoversubplots === 'axis')
1093
+ {
1094
+ var bottom_ya = fullLayout._plots.xy.yaxis;
1095
+ ly = bottom_ya._offset + (xa.side === 'top' ? 0 : bottom_ya._length);
1096
+ }
1097
+ else
1098
1099
+ ly = ya._offset + (xa.side === 'top' ? 0 : ya._length);
1100
1101
1102
var halfWidth = tbb.width / 2 + HOVERTEXTPAD;
1103
0 commit comments