diff --git a/src/components/colorscale/defaults.js b/src/components/colorscale/defaults.js index 2620ff873f9..569a43793e1 100644 --- a/src/components/colorscale/defaults.js +++ b/src/components/colorscale/defaults.js @@ -115,6 +115,9 @@ module.exports = function colorScaleDefaults(parentContIn, parentContOut, layout if(prefix && inTrace) showScaleDflt = hasColorbar(containerIn); var showScale = coerce(prefix + 'showscale', showScaleDflt); - if(showScale) colorbarDefaults(containerIn, containerOut, layout); + if(showScale) { + if(prefix && template) containerOut._template = template; + colorbarDefaults(containerIn, containerOut, layout); + } } }; diff --git a/test/image/baselines/marker_colorscale_template.png b/test/image/baselines/marker_colorscale_template.png index a22df3b544a..7bf77870b71 100644 Binary files a/test/image/baselines/marker_colorscale_template.png and b/test/image/baselines/marker_colorscale_template.png differ