diff --git a/src/traces/carpet/axis_defaults.js b/src/traces/carpet/axis_defaults.js index a096e7efecb..59cd9c19948 100644 --- a/src/traces/carpet/axis_defaults.js +++ b/src/traces/carpet/axis_defaults.js @@ -113,14 +113,15 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, options) // inherit from global font color in case that was provided. var dfltFontColor = (dfltColor === containerIn.color) ? dfltColor : font.color; - coerce('title.text'); - Lib.coerceFont(coerce, 'title.font', { - family: font.family, - size: Math.round(font.size * 1.2), - color: dfltFontColor - }); - - coerce('title.offset'); + var title = coerce('title.text'); + if(title) { + Lib.coerceFont(coerce, 'title.font', { + family: font.family, + size: Math.round(font.size * 1.2), + color: dfltFontColor + }); + coerce('title.offset'); + } coerce('tickangle'); @@ -203,11 +204,6 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, options) // but no, we *actually* want to coerce this. coerce('tickmode'); - if(!containerOut.title.text) { - delete containerOut.title.font; - delete containerOut.title.offset; - } - return containerOut; };