Skip to content

Commit 8f5f3d5

Browse files
author
Domino987
committed
guard for no hover labels
1 parent b116dc1 commit 8f5f3d5

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
@@ -775,9 +775,9 @@ function _hover(gd, evt, subplot, noHoverEvent) {
775775
var actualHoverData = hoverData.filter(function(d) {
776776
return d.hoverinfo !== 'none';
777777
});
778-
var hoverLabels = createHoverText(actualHoverData, labelOpts, gd);
778+
var hoverLabels = actualHoverData.length && createHoverText(actualHoverData, labelOpts, gd);
779779

780-
if(!helpers.isUnifiedHover(hovermode)) {
780+
if(hoverLabels && !helpers.isUnifiedHover(hovermode)) {
781781
hoverAvoidOverlaps(hoverLabels, rotateLabels ? 'xa' : 'ya', fullLayout);
782782
alignHoverText(hoverLabels, rotateLabels, fullLayout._invScaleX, fullLayout._invScaleY);
783783
} // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true

0 commit comments

Comments
 (0)