@@ -927,7 +927,7 @@ var TEXTOFFSETSIGN = {
927
927
start : 1 , end : - 1 , middle : 0 , bottom : 1 , top : - 1
928
928
} ;
929
929
930
- function textPointPosition ( s , textPosition , fontSize , markerRadius ) {
930
+ function textPointPosition ( s , textPosition , fontSize , markerRadius , dontTouchParent ) {
931
931
var group = d3 . select ( s . node ( ) . parentNode ) ;
932
932
933
933
var v = textPosition . indexOf ( 'top' ) !== - 1 ?
@@ -949,7 +949,9 @@ function textPointPosition(s, textPosition, fontSize, markerRadius) {
949
949
950
950
// fix the overall text group position
951
951
s . attr ( 'text-anchor' , h ) ;
952
- group . attr ( 'transform' , strTranslate ( dx , dy ) ) ;
952
+ if ( ! dontTouchParent ) {
953
+ group . attr ( 'transform' , strTranslate ( dx , dy ) ) ;
954
+ }
953
955
}
954
956
955
957
function extracTextFontSize ( d , trace ) {
@@ -1019,7 +1021,8 @@ drawing.selectedTextStyle = function(s, trace) {
1019
1021
var fontSize = extracTextFontSize ( d , trace ) ;
1020
1022
1021
1023
Color . fill ( tx , tc ) ;
1022
- textPointPosition ( tx , tp , fontSize , d . mrc2 || d . mrc ) ;
1024
+ var dontTouchParent = Registry . traceIs ( trace , 'bar-like' ) ;
1025
+ textPointPosition ( tx , tp , fontSize , d . mrc2 || d . mrc , dontTouchParent ) ;
1023
1026
} ) ;
1024
1027
} ;
1025
1028
0 commit comments