loop through chart