I need assistance with drawing rectangles in an SVG where the translation data is stored in an array.
Below is the code:
var vis=d3.select("#usvg");
var rectData=[10,21,32,43,54,65,76,87,98,109];
vis.selectAll("rect").data(rectData).enter().append("rect")
.attr("width",10).attr("height",10).style("fill",'#cbdb53')
.attr("transform",function(d){return translate(72,d);});
I am looking to retrieve the y coordinate of translation from the rectData array. Can anyone help me with this?