Skip to content

Commit 3747e72

Browse files
author
Lucas Demenais
committed
fix: x hoverlabel hidden with hoversubplots axis
1 parent d5d3712 commit 3747e72

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/components/fx/hover.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,17 @@ function createHoverText(hoverData, opts) {
10871087
(outerTop - tbb.top + HOVERARROWSIZE + HOVERTEXTPAD)));
10881088

10891089
lx = xa._offset + (c0.x0 + c0.x1) / 2;
1090-
ly = ya._offset + (xa.side === 'top' ? 0 : ya._length);
1090+
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+
}
10911101

10921102
var halfWidth = tbb.width / 2 + HOVERTEXTPAD;
10931103

0 commit comments

Comments
 (0)