Skip to content

Commit ed8430c

Browse files
committed
add fallback in the case of zero width or height
1 parent 6f549d2 commit ed8430c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/fx/hover.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,8 @@ function createHoverText(hoverData, opts, gd) {
896896
var t0 = c0[axLetter + 'Label'];
897897
var outerContainerBB = outerContainer.node().getBoundingClientRect();
898898
var outerTop = outerContainerBB.top;
899-
var outerWidth = outerContainerBB.width;
900-
var outerHeight = outerContainerBB.height;
899+
var outerWidth = outerContainerBB.width || fullLayout.width;
900+
var outerHeight = outerContainerBB.height || fullLayout.height;
901901

902902
// show the common label, if any, on the axis
903903
// never show a common label in array mode,

0 commit comments

Comments
 (0)