@@ -29,28 +29,28 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce,
2929 delete containerOut . tickcolor ;
3030 }
3131
32- var showTickLabels = coerce ( 'showticklabels' ) ;
32+ var showAttrDflt = getShowAttrDflt ( containerIn ) ;
33+
34+ var showTickLabels = coerce ( 'showticklabels' ) ,
35+ tickFormat = coerce ( 'tickformat' ) ,
36+ tickPrefix = coerce ( 'tickprefix' ) ,
37+ tickSuffix = coerce ( 'ticksuffix' ) ;
38+
39+ if ( tickPrefix ) coerce ( 'showtickprefix' , showAttrDflt ) ;
40+ if ( tickSuffix ) coerce ( 'showticksuffix' , showAttrDflt ) ;
41+
3342 if ( showTickLabels ) {
3443 Lib . coerceFont ( coerce , 'tickfont' , options . font || { } ) ;
3544 coerce ( 'tickangle' ) ;
45+ }
3646
37- var showAttrDflt = getShowAttrDflt ( containerIn ) ;
38-
39- if ( axType !== 'category' ) {
40- var tickFormat = coerce ( 'tickformat' ) ;
41- if ( ! options . noHover ) coerce ( 'hoverformat' ) ;
47+ if ( axType !== 'category' ) {
48+ if ( ! options . noHover ) coerce ( 'hoverformat' ) ;
4249
43- if ( ! tickFormat && axType !== 'date' ) {
44- coerce ( 'showexponent' , showAttrDflt ) ;
45- coerce ( 'exponentformat' ) ;
46- }
50+ if ( ! tickFormat && axType !== 'date' ) {
51+ coerce ( 'showexponent' , showAttrDflt ) ;
52+ coerce ( 'exponentformat' ) ;
4753 }
48-
49- var tickPrefix = coerce ( 'tickprefix' ) ;
50- if ( tickPrefix ) coerce ( 'showtickprefix' , showAttrDflt ) ;
51-
52- var tickSuffix = coerce ( 'ticksuffix' ) ;
53- if ( tickSuffix ) coerce ( 'showticksuffix' , showAttrDflt ) ;
5454 }
5555} ;
5656
0 commit comments