'use strict';

var Color = require('../../components/color');
var hasColorscale = require('../../components/colorscale/helpers').hasColorscale;
var colorscaleDefaults = require('../../components/colorscale/defaults');

module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, defaultColor, layout) {
    coerce('marker.color', defaultColor);

    if(hasColorscale(traceIn, 'marker')) {
        colorscaleDefaults(
            traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'}
        );
    }

    coerce('marker.line.color', Color.defaultLine);

    if(hasColorscale(traceIn, 'marker.line')) {
        colorscaleDefaults(
            traceIn, traceOut, layout, coerce, {prefix: 'marker.line.', cLetter: 'c'}
        );
    }

    coerce('marker.line.width');
    coerce('marker.opacity');
    coerce('marker.pattern.shape');
    coerce('marker.pattern.bgcolor');
    coerce('marker.pattern.size');
    coerce('marker.pattern.solidity');
    coerce('selected.marker.color');
    coerce('unselected.marker.color');
};

@@ -813,32 +813,46 @@
 r.opacity');%0A   
+ var pattern =
  coerce('marker.
@@ -864,24 +864,47 @@
 rn.shape');%0A
+    if (pattern) %7B%0A    
     coerce('
@@ -925,32 +925,36 @@
 .bgcolor');%0A    
+  
+  
 coerce('marker.p
@@ -964,24 +964,28 @@
 ern.size');%0A
+    
     coerce('
@@ -1007,24 +1007,30 @@
 solidity');%0A
+    %7D%0A
     coerce('

Update src/traces/bar/style_defaults.js