update the animation for the d3 chart