Chart changed so displays 1 of each category only
fixing charts, changed from for loops to foreach