1
我想放大像點線一樣的點圖,但每個點都通過縮放步驟進行復制。如何縮放d3.js DotsChart而不是lineChart
g.updateCurve = function(_){
// Update the line path.
this.select(".line")
.attr("d", line);
// add each point
this.selectAll('.circle').data(data).enter().append("circle")
.attr("class", "dot")
.attr("cx", function(d) {return xScale (d.date); })
.attr("cy", function(d) {return yScale (d.ySpeed); })
.attr("r", function(d) {return rScale (d.xSpeed); });
return this;
};
如何更改正確的縮放比例?
我對這個JSFiddle