Circle = { init: function(svg, values, cxAccessor, cyAccessor){ return svg.selectAll("circle") .data(values) .enter() .append("circle") .attr("cx", cxAccessor) .attr("cy", cyAccessor) .attr("r", "5px") .style("fill", "pink") .attr("stroke", "blue") .attr("stroke-width", "2px"); } };