function setFillStyle(sel, trace, gd, forLegend) {
    var markerPattern = trace.fillpattern;
    var fillgradient = trace.fillgradient;
    var pAttr = drawing.getPatternAttr;
    var patternShape = markerPattern && (pAttr(markerPattern.shape, 0, '') || pAttr(markerPattern.path, 0, ''));
    if(patternShape) {
        var patternBGColor = pAttr(markerPattern.bgcolor, 0, null);
        var patternFGColor = pAttr(markerPattern.fgcolor, 0, null);
        var patternFGOpacity = markerPattern.fgopacity;
        var patternSize = pAttr(markerPattern.size, 0, 8);
        var patternSolidity = pAttr(markerPattern.solidity, 0, 0.3);
        var patternID = trace.uid;
        drawing.pattern(sel, 'point', gd, patternID,
            patternShape, patternSize, patternSolidity,
            undefined, markerPattern.fillmode,
            patternBGColor, patternFGColor, patternFGOpacity
        );
    } else if(fillgradient && fillgradient.type !== 'none') {
        var direction = fillgradient.type;
        var gradientID = 'scatterfill-' + trace.uid;
        if(forLegend) {
            gradientID = 'legendfill-' + trace.uid;
        }

        if(!forLegend && (fillgradient.start !== undefined || fillgradient.stop !== undefined)) {
            var start, stop;
            if(direction === 'horizontal') {
                start = {
                    x: fillgradient.start,
                    y: 0,
                };
                stop = {
                    x: fillgradient.stop,
                    y: 0,
                };
            } else if(direction === 'vertical') {
                start = {
                    x: 0,
                    y: fillgradient.start,
                };
                stop = {
                    x: 0,
                    y: fillgradient.stop,
                };
            }

            start.x = trace._xA.c2p(
                (start.x === undefined) ? trace._extremes.x.min[0].val : start.x, true
            );
            start.y = trace._yA.c2p(
                (start.y === undefined) ? trace._extremes.y.min[0].val : start.y, true
            );

            stop.x = trace._xA.c2p(
                (stop.x === undefined) ? trace._extremes.x.max[0].val : stop.x, true
            );
            stop.y = trace._yA.c2p(
                (stop.y === undefined) ? trace._extremes.y.max[0].val : stop.y, true
            );
            sel.call(gradientWithBounds, gd, gradientID, 'linear', fillgradient.colorscale, 'fill', start, stop, true, false);
        } else {
            if(direction === 'horizontal') {
                direction = direction + 'reversed';
            }
            sel.call(drawing.gradient, gd, gradientID, direction, fillgradient.colorscale, 'fill');
        }
    } else if(trace.fillcolor) {
        sel.call(Color.fill, trace.fillcolor);
    }
}
Translate node

@param {object} d : calcdata point item
@param {sel} sel : d3 selction of node to translate
@param {object} xa : corresponding full xaxis object
@param {object} ya : corresponding full yaxis object

@return {boolean} :
 true if selection got translated
 false if selection could not get translated