fixing a bug in rotating chart