change the logic to calculate color value
upate dataset