wefra/lib/d3-v6-oop/circle.js

15 lines
390 B
JavaScript
Raw Normal View History

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");
}
};