class Circle{
constructor(element,x,y){
this.element = element
this.x = x
this.y = y
this.px = this.xScale(this.x)
this.py = this.yScale(this.y)
this.r = 10
this.fill = "steelblue"
this.stroke = "black"
this.element.append("circle")
.attr("cx",this.px)
.attr("cy",this.py)
.attr("r",this.r)
.attr("fill",this.fill)
.attr("stroke",this.stroke)
}
xScale(x){
return d3.scaleLinear().domain([-10,10]).range([0,300])(x)
}
yScale(y){
return d3.scaleLinear().domain([-10,10]).range([300,0])(y)
}
}