Skip to content

Commit 46f815d

Browse files
committed
zero means no trimming at all
1 parent c76ebc2 commit 46f815d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/fx/hover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ function createHoverText(hoverData, opts, gd) {
689689
// strip out our pseudo-html elements from d.name (if it exists at all)
690690
name = svgTextUtils.plainText(d.name || '');
691691

692-
if(name.length > commonLabelOpts.namelength) name = name.substr(0, commonLabelOpts.namelength - 3) + '...';
692+
if(name.length > commonLabelOpts.namelength && commonLabelOpts.namelength > 0) name = name.substr(0, commonLabelOpts.namelength - 3) + '...';
693693
}
694694

695695
// used by other modules (initially just ternary) that

0 commit comments

Comments
 (0)