@@ -927,7 +927,7 @@ var TEXTOFFSETSIGN = {
927927 start : 1 , end : - 1 , middle : 0 , bottom : 1 , top : - 1
928928} ;
929929
930- function textPointPosition ( s , textPosition , fontSize , markerRadius ) {
930+ function textPointPosition ( s , textPosition , fontSize , markerRadius , dontTouchParent ) {
931931 var group = d3 . select ( s . node ( ) . parentNode ) ;
932932
933933 var v = textPosition . indexOf ( 'top' ) !== - 1 ?
@@ -949,7 +949,9 @@ function textPointPosition(s, textPosition, fontSize, markerRadius) {
949949
950950 // fix the overall text group position
951951 s . attr ( 'text-anchor' , h ) ;
952- group . attr ( 'transform' , strTranslate ( dx , dy ) ) ;
952+ if ( ! dontTouchParent ) {
953+ group . attr ( 'transform' , strTranslate ( dx , dy ) ) ;
954+ }
953955}
954956
955957function extracTextFontSize ( d , trace ) {
@@ -1019,7 +1021,8 @@ drawing.selectedTextStyle = function(s, trace) {
10191021 var fontSize = extracTextFontSize ( d , trace ) ;
10201022
10211023 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 ) ;
10231026 } ) ;
10241027} ;
10251028
0 commit comments