added code for modifying chart xml