i was hopeing that someone might could help me.
I would like a script which makes value different colors like;
-0.2 > 0.2 = text will be black
0.21 > 0.7 = text will be orange
0.7 > 100 = text will be red
I have tried this:
if (event.target.textColor =event.value>=-0.2 && event.value<=0.2)
event.target.fillColor = color.orange;
else if (event.target.textColor =event.value>=-0.2 && event.value<=0.2)
But it dosen't work the way i would
Thanks in advance!
You've made quite a mess of it... Use this code:
if (event.value>=-0.2 && event.value<=0.2) event.target.textColor = color.black; else if (event.value>0.2 && event.value<=0.7) event.target.textColor = ["RGB",1, 0.5, 0]; else if (event.value>0.7 && event.value<=100) event.target.textColor = color.red;
But what about all the other possible values? ie, below -0.2 and above 100?
Thanks a lot. Well, normally the values are below 10. So its just istead of using ~
If it's possible to make values below -0.2 red, that could be awesome.
Sure. Add this at the end:
else if (event.value<-0.2) event.target.textColor = color.red;