I have a graph comprised up of areas, lines and circles that I am trying to update on user input, which I have already gotten to work, but when transitioning from a lower data amount to a higher amount, say from [4,2,3,4,5]
to [2,4,3,1,5,8,6]
, the lines animate their current paths to their new positions, but the offset just gets snapped into place, there is no animation for any new values added to the paths.
What I would like it to do is animate from the current line path, to the new line path, with a smooth transition, so that the new values don't just snap into place, regardless of the number of data.
Also, on a side note, the graphs width keeps changing on update, I'd like it to stretch to the full width of the svg no matter how much data is present, how could I achieve that?
Here is a fiddle of what I have thus far http://jsfiddle.net/znmBy/.
I hope I was clear enough, I am new to D3 so I am a little unsure about the terminology.