Hi,
I want to make a list of products ('name') that have different deadlines ('tr_datetime_finished').
I want the background color to change according to the time to the deadline. something like 5 t deadline is red, 10 yellow, and rest green
I am doing something wrong when using the advanced formatting only for two colors:
Can someone give me a hand?
var endDate=§datapoint['tr_datetime_finished']
var startDate= Today()
var timetoFinish = DateDiff(endDate, StartDate, 'days')
var color = iff(timetoFinish < 5, 'color1', 'color2')
return {
backgroundColor: color,
}
Cheers
Pedro