Skip to content

Commit 8e718bf

Browse files
committed
fix legend for bar array marker line width
1 parent 6de37ee commit 8e718bf

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/components/legend/style.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ function styleBars(d) {
171171
.attr('transform', 'translate(20,0)');
172172
barpath.exit().remove();
173173
barpath.each(function(d) {
174-
var w = (d.mlw + 1 || markerLine.width + 1) - 1,
175-
p = d3.select(this),
176-
d0 = d[0];
174+
var p = d3.select(this),
175+
d0 = d[0],
176+
w = (d0.mlw + 1 || markerLine.width + 1) - 1;
177177

178178
p.style('stroke-width', w + 'px')
179179
.call(Color.fill, d0.mc || marker.color);
219 Bytes
Loading

test/image/mocks/bar_marker_array.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@
1919
"#447adb",
2020
"#db5a44",
2121
"#447adb"
22-
]
22+
],
23+
"line": {
24+
"width": [
25+
2,
26+
3,
27+
2,
28+
3
29+
]
30+
}
2331
},
2432
"type": "bar"
2533
}

0 commit comments

Comments
 (0)