d3.js templates and codes