Skip to content

Commit 8a308a8

Browse files
committed
review fixes
1 parent ac2f7f4 commit 8a308a8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/fx/attributes.js

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838
valType: 'number',
3939
min: 0,
4040
dflt: 15,
41+
arrayOk: true,
4142
role: 'style',
4243
description: 'Sets the length (in number of characters) of the hover labels for this trace'
4344
}

src/components/fx/hover.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,9 @@ 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 && commonLabelOpts.namelength > 0) name = name.substr(0, commonLabelOpts.namelength - 3) + '...';
692+
if(commonLabelOpts.namelength > 0 && name.length > commonLabelOpts.namelength) {
693+
name = name.substr(0, commonLabelOpts.namelength - 3) + '...';
694+
}
693695
}
694696

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

0 commit comments

Comments
 (0)