moved color definition into the updateChart function