... svg.selectAll("circle") .data(data) .enter() .append("circle") .attr("r", 10) .attr("cx", function(x){return x.weight / 3}) .attr("cy", function(x){return x.height * 2}) .style("fill", function(x){return x.colour})