1

点グラフを線のようにズームしたいのですが、各点がズームステップで複製されます。

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に取り組んでいます

4

1 に答える 1

2
于 2013-07-31T16:34:07.577 に答える