diff --git a/src/components/drawing/index.js b/src/components/drawing/index.js index c3353345dca..981d6f2aa55 100644 --- a/src/components/drawing/index.js +++ b/src/components/drawing/index.js @@ -504,6 +504,8 @@ drawing.pattern = function(sel, gd, patternID, shape, size, solidity, mcc, fillm break; } + var isLegend = patternID.substr(0, 6) === 'legend'; + var str = [ shape || 'noSh', bgcolor || 'noBg', @@ -527,7 +529,8 @@ drawing.pattern = function(sel, gd, patternID, shape, size, solidity, mcc, fillm 'id': fullID, 'width': width + 'px', 'height': height + 'px', - 'patternUnits': 'userSpaceOnUse' + 'patternUnits': 'userSpaceOnUse', + 'patternTransform': isLegend ? 'scale(0.7)' : '' }); if(bgcolor) { diff --git a/test/image/baselines/pattern_bars.png b/test/image/baselines/pattern_bars.png index 2a93a12acd3..af75ef71ddf 100644 Binary files a/test/image/baselines/pattern_bars.png and b/test/image/baselines/pattern_bars.png differ diff --git a/test/image/baselines/pattern_fgcolor_overlay_fillmode.png b/test/image/baselines/pattern_fgcolor_overlay_fillmode.png index 59744a2c1da..2bc5b92e043 100644 Binary files a/test/image/baselines/pattern_fgcolor_overlay_fillmode.png and b/test/image/baselines/pattern_fgcolor_overlay_fillmode.png differ diff --git a/test/image/baselines/pattern_with_colorscale.png b/test/image/baselines/pattern_with_colorscale.png index 7fb0e21a4b7..14e74e551e4 100644 Binary files a/test/image/baselines/pattern_with_colorscale.png and b/test/image/baselines/pattern_with_colorscale.png differ