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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -