@@ -526,9 +526,9 @@ function drawTexts(g, gd, legendObj) {
526
526
527
527
if ( Registry . hasTransform ( fullInput , 'groupby' ) ) {
528
528
var groupbyIndices = Registry . getTransformIndices ( fullInput , 'groupby' ) ;
529
- var index = groupbyIndices [ groupbyIndices . length - 1 ] ;
529
+ var _index = groupbyIndices [ groupbyIndices . length - 1 ] ;
530
530
531
- var kcont = Lib . keyedContainer ( fullInput , 'transforms[' + index + '].styles' , 'target' , 'value.name' ) ;
531
+ var kcont = Lib . keyedContainer ( fullInput , 'transforms[' + _index + '].styles' , 'target' , 'value.name' ) ;
532
532
533
533
kcont . set ( legendItem . trace . _group , newName ) ;
534
534
@@ -537,7 +537,11 @@ function drawTexts(g, gd, legendObj) {
537
537
update . name = newName ;
538
538
}
539
539
540
- return Registry . call ( '_guiRestyle' , gd , update , trace . index ) ;
540
+ if ( fullInput . _isShape ) {
541
+ return Registry . call ( '_guiRelayout' , gd , 'shapes[' + trace . index + '].name' , update . name ) ;
542
+ } else {
543
+ return Registry . call ( '_guiRestyle' , gd , update , trace . index ) ;
544
+ }
541
545
} ) ;
542
546
} else {
543
547
textLayout ( textEl , g , gd , legendObj ) ;
0 commit comments