javascript to draw svg shapes with d3.js