D3 Y Axis Scaling and Path Transition
问题 I've been very closely following this post about D3 line transitions, implementing something similar to this, except having axis transitions by time. The end goal is to display real time data points. I have defined axes, like so: var x = d3.time.scale() .domain([now - (n - 2) * duration, now - duration]) .range([0, width]); var y = d3.scale.linear() .range([height, 0]) .domain([0, 100]) var axisx = svg.append('g') .attr('class', 'x axis') .attr('transform', `translate(0, ${height})`) .call(x