@@ -62,14 +62,6 @@ function handleDefaults(contIn, contOut, coerce, opts) {
62
62
63
63
coerceAxis ( 'uirevision' , contOut . uirevision ) ;
64
64
65
- var dfltColor ;
66
- var dfltFontColor ;
67
-
68
- if ( visible ) {
69
- dfltColor = coerceAxis ( 'color' ) ;
70
- dfltFontColor = ( dfltColor === axIn . color ) ? dfltColor : opts . font . color ;
71
- }
72
-
73
65
// We don't want to make downstream code call ax.setScale,
74
66
// as both radial and angular axes don't have a set domain.
75
67
// Furthermore, angular axes don't have a set range.
@@ -91,18 +83,6 @@ function handleDefaults(contIn, contOut, coerce, opts) {
91
83
92
84
coerceAxis ( 'range' ) ;
93
85
axOut . cleanRange ( 'range' , { dfltRange : [ 0 , 1 ] } ) ;
94
-
95
- if ( visible ) {
96
- coerceAxis ( 'side' ) ;
97
- coerceAxis ( 'angle' , sector [ 0 ] ) ;
98
-
99
- coerceAxis ( 'title.text' ) ;
100
- Lib . coerceFont ( coerceAxis , 'title.font' , {
101
- family : opts . font . family ,
102
- size : Lib . bigFont ( opts . font . size ) ,
103
- color : dfltFontColor
104
- } ) ;
105
- }
106
86
break ;
107
87
108
88
case 'angularaxis' :
@@ -142,20 +122,27 @@ function handleDefaults(contIn, contOut, coerce, opts) {
142
122
} ) ;
143
123
144
124
if ( visible ) {
125
+ var dfltColor ;
126
+ var dfltFontColor ;
127
+ var dfltFontSize ;
128
+ var dfltFontFamily ;
129
+ var font = opts . font || { } ;
130
+
131
+ dfltColor = coerceAxis ( 'color' ) ;
132
+ dfltFontColor = ( dfltColor === axIn . color ) ? dfltColor : font . color ;
133
+ dfltFontSize = font . size ;
134
+ dfltFontFamily = font . family ;
135
+
145
136
handleTickValueDefaults ( axIn , axOut , coerceAxis , axOut . type ) ;
146
- handleTickLabelDefaults ( axIn , axOut , coerceAxis , axOut . type ) ;
147
- handleTickMarkDefaults ( axIn , axOut , coerceAxis , { outerTicks : true } ) ;
137
+ handleTickLabelDefaults ( axIn , axOut , coerceAxis , axOut . type , {
138
+ font : {
139
+ color : dfltFontColor ,
140
+ size : dfltFontSize ,
141
+ family : dfltFontFamily
142
+ }
143
+ } ) ;
148
144
149
- var showTickLabels = coerceAxis ( 'showticklabels' ) ;
150
- if ( showTickLabels ) {
151
- Lib . coerceFont ( coerceAxis , 'tickfont' , {
152
- family : opts . font . family ,
153
- size : opts . font . size ,
154
- color : dfltFontColor
155
- } ) ;
156
- coerceAxis ( 'tickangle' ) ;
157
- coerceAxis ( 'tickformat' ) ;
158
- }
145
+ handleTickMarkDefaults ( axIn , axOut , coerceAxis , { outerTicks : true } ) ;
159
146
160
147
handleLineGridDefaults ( axIn , axOut , coerceAxis , {
161
148
dfltColor : dfltColor ,
@@ -170,6 +157,18 @@ function handleDefaults(contIn, contOut, coerce, opts) {
170
157
} ) ;
171
158
172
159
coerceAxis ( 'layer' ) ;
160
+
161
+ if ( axName === 'radialaxis' ) {
162
+ coerceAxis ( 'side' ) ;
163
+ coerceAxis ( 'angle' , sector [ 0 ] ) ;
164
+
165
+ coerceAxis ( 'title.text' ) ;
166
+ Lib . coerceFont ( coerceAxis , 'title.font' , {
167
+ color : dfltFontColor ,
168
+ size : Lib . bigFont ( dfltFontSize ) ,
169
+ family : dfltFontFamily
170
+ } ) ;
171
+ }
173
172
}
174
173
175
174
if ( axType !== 'category' ) coerceAxis ( 'hoverformat' ) ;
0 commit comments