Comment Comment by pornel ES6 is especially nice with D3.js: .attr('transform', function(d) { return "translate(" + (d.x + 1) + " 0)"; }) becomes: .attr('transform', d => `translate(${d.x + 1} 0)`) And: .attr({x:x, y:y, width:width, height:height}) .attr({x, y, width, height}) parent pornel 11 years ago