Skip to content

Commit 2b26746

Browse files
committed
Reverse coerce logic for carpet axes titles [882]
1 parent e3bcf7c commit 2b26746

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/traces/carpet/axis_defaults.js

+9-13
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,15 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, options)
113113
// inherit from global font color in case that was provided.
114114
var dfltFontColor = (dfltColor === containerIn.color) ? dfltColor : font.color;
115115

116-
coerce('title.text');
117-
Lib.coerceFont(coerce, 'title.font', {
118-
family: font.family,
119-
size: Math.round(font.size * 1.2),
120-
color: dfltFontColor
121-
});
122-
123-
coerce('title.offset');
116+
var title = coerce('title.text');
117+
if(title) {
118+
Lib.coerceFont(coerce, 'title.font', {
119+
family: font.family,
120+
size: Math.round(font.size * 1.2),
121+
color: dfltFontColor
122+
});
123+
coerce('title.offset');
124+
}
124125

125126
coerce('tickangle');
126127

@@ -203,11 +204,6 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, options)
203204
// but no, we *actually* want to coerce this.
204205
coerce('tickmode');
205206

206-
if(!containerOut.title.text) {
207-
delete containerOut.title.font;
208-
delete containerOut.title.offset;
209-
}
210-
211207
return containerOut;
212208
};
213209

0 commit comments

Comments
 (0)