d3 js - update transition with multiple lines
问题 Almost got it - the y-axis and the two paths update as they should. The text value dosen't and part of the problem is the selection, i select the wrong way. And then it doesn't adhere to the changes in y but instead goes galloping off. Code that almost work: // First transition the line & label to the new city. var t0 = level.data(dsMainArr).transition().duration(750); t0.selectAll(".line") .attr("d", function(d) { return line(d.values); }) .style("stroke", function(d) { return color(d.name);