Added logic to set chart colors for multiple datasets.