@@ -29,28 +29,28 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce,
29
29
delete containerOut . tickcolor ;
30
30
}
31
31
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
+
33
42
if ( showTickLabels ) {
34
43
Lib . coerceFont ( coerce , 'tickfont' , options . font || { } ) ;
35
44
coerce ( 'tickangle' ) ;
45
+ }
36
46
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' ) ;
42
49
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' ) ;
47
53
}
48
-
49
- var tickPrefix = coerce ( 'tickprefix' ) ;
50
- if ( tickPrefix ) coerce ( 'showtickprefix' , showAttrDflt ) ;
51
-
52
- var tickSuffix = coerce ( 'ticksuffix' ) ;
53
- if ( tickSuffix ) coerce ( 'showticksuffix' , showAttrDflt ) ;
54
54
}
55
55
} ;
56
56
0 commit comments