Fixing broken javascript for chart animation. Please test your changes, folks.