Skip to content

Commit fd89e23

Browse files
committed
apply smaller scale of patterns in legend
1 parent 6879e51 commit fd89e23

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/components/drawing/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ drawing.pattern = function(sel, gd, patternID, shape, size, solidity, mcc, fillm
504504
break;
505505
}
506506

507+
var isLegend = patternID.substr(0, 6) === 'legend';
508+
507509
var str = [
508510
shape || 'noSh',
509511
bgcolor || 'noBg',
@@ -527,7 +529,8 @@ drawing.pattern = function(sel, gd, patternID, shape, size, solidity, mcc, fillm
527529
'id': fullID,
528530
'width': width + 'px',
529531
'height': height + 'px',
530-
'patternUnits': 'userSpaceOnUse'
532+
'patternUnits': 'userSpaceOnUse',
533+
'patternTransform': isLegend ? 'scale(0.7)' : ''
531534
});
532535

533536
if(bgcolor) {

test/image/baselines/pattern_bars.png

-60 Bytes
Loading
Loading
120 Bytes
Loading

0 commit comments

Comments
 (0)