I need an arcade expression that changes the text color based on age. So if if the age is 5 days or less its green text, between 6-10 days its yellow and 11-15 days is red. I am not that experienced with arcade and I tried to find examples of what I wanted and I tired to make it but could not get it to work.
var val = $datapoint.Age;
var textColor ="green";
if (val <= 5);
result='green'
var textColor ="yellow";
if (val <= 10);
results='yellow'
var textColor ="red";
if (val >= 13);
results='red'
return results;
I am not sure how to made the range value of between 6-10 days.
Thank you for any help!
Solved! Go to Solution.
This is exactly what I was looking for! Thank you, you are a lifesaver!