Skip to content

Commit 5d0d930

Browse files
committed
look in calcdata item for 'mc' and 'mlc' in bar legend style
1 parent 74dbbc4 commit 5d0d930

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/legend/style.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,14 @@ function styleBars(d) {
172172
barpath.exit().remove();
173173
barpath.each(function(d) {
174174
var w = (d.mlw + 1 || markerLine.width + 1) - 1,
175-
p = d3.select(this);
175+
p = d3.select(this),
176+
d0 = d[0];
176177

177178
p.style('stroke-width', w + 'px')
178-
.call(Color.fill, d.mc || marker.color);
179+
.call(Color.fill, d0.mc || marker.color);
179180

180181
if(w) {
181-
p.call(Color.stroke, d.mlc || markerLine.color);
182+
p.call(Color.stroke, d0.mlc || markerLine.color);
182183
}
183184
});
184185
}

0 commit comments

Comments
 (0)