@@ -49,7 +49,7 @@ function convertStyle(gd, trace) {
49
49
if ( trace . visible !== true ) return opts ;
50
50
51
51
if ( subTypes . hasText ( trace ) ) {
52
- opts . text = convertTextStyle ( trace ) ;
52
+ opts . text = convertTextStyle ( trace , gd ) ;
53
53
opts . textSel = convertTextSelection ( trace , trace . selected ) ;
54
54
opts . textUnsel = convertTextSelection ( trace , trace . unselected ) ;
55
55
}
@@ -102,7 +102,7 @@ function convertStyle(gd, trace) {
102
102
return opts ;
103
103
}
104
104
105
- function convertTextStyle ( trace ) {
105
+ function convertTextStyle ( trace , gd ) {
106
106
var count = trace . _length ;
107
107
var textfontIn = trace . textfont ;
108
108
var textpositionIn = trace . textposition ;
@@ -115,19 +115,20 @@ function convertTextStyle(trace) {
115
115
116
116
var texttemplate = trace . texttemplate ;
117
117
if ( texttemplate ) {
118
+ var d3locale = gd . _fullLayout . _d3locale ;
118
119
optsOut . text = [ ] ;
119
120
var pt ;
120
121
if ( Array . isArray ( texttemplate ) ) {
121
122
for ( i = 0 ; i < texttemplate . length ; i ++ ) {
122
123
pt = { } ;
123
124
appendArrayPointValue ( pt , trace , i ) ;
124
- optsOut . text . push ( Lib . texttemplateString ( texttemplate [ i ] , pt , function ( ) { } , pt ) ) ;
125
+ optsOut . text . push ( Lib . texttemplateString ( texttemplate [ i ] , pt , d3locale , pt ) ) ;
125
126
}
126
127
} else {
127
128
for ( i = 0 ; i < count ; i ++ ) {
128
129
pt = { } ;
129
130
appendArrayPointValue ( pt , trace , i ) ;
130
- optsOut . text . push ( Lib . texttemplateString ( texttemplate , pt , function ( ) { } , pt ) ) ;
131
+ optsOut . text . push ( Lib . texttemplateString ( texttemplate , pt , d3locale , pt ) ) ;
131
132
}
132
133
}
133
134
} else {
0 commit comments