javascript - How to use d3.legend.color() in d3 v4 -
i have d3 v3 code :
var legendlinear = d3.legend.color() .shapewidth(math.round(svgw/8)) .shapeheight(containerw/8/3/2) .orient('horizontal') .scale(ordinal); svg.call(legendlinear);
but in d3 v4 error d3.legend undefined
what proper code v4? searched web nothing.
Comments
Post a Comment