Refactored events for animating charts