Pull out some of the animation details as a block

This enables different animations to be used for the different chart
types, which in turn prevents the crash with the pie chart (with the
spring animation).