make a d3 legend