Starting Transitions and Animations With Area Graph in D3.JS
问题 I want to have the area graph "draw" itself at the start of the program from left to right. I already have one line in my graph doing this, however I cannot get the area under the line to correctly animate, or "draw" itself when the page first boots up. Currently, this is what I have for my area. var area = d3.svg.area() .x(function(d) {return xScale(d.date); }) .y0(line_chart_height) .y1(function(d) {return yScale(d.close); }); line_chart.append("path") .datum(data) .attr("class", "area")