Skip to content

Commit

Permalink
apply smaller scale of patterns in legend
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Jun 17, 2021
1 parent 6879e51 commit fd89e23
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/drawing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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) {
Expand Down
Binary file modified test/image/baselines/pattern_bars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/pattern_fgcolor_overlay_fillmode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/pattern_with_colorscale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fd89e23

Please sign in to comment.