I am attempting to set the background color of a cell based on the cells content. If I go to appearance > background on the given column I can use ternary operators like so
{{item === 0 ? '#147034' : '#3DBDF7'}}
I can get it to work. but I want more complex logic because I want to make it into a heatmap so I was thinking about normalizing the value based on the min and max and then using that to determine the color.
I have tried several different ways of putting ifs in here and none worked. I also tried a switch statement.
I also tried making a js query to do the heavy lifting, but I could not figure out how to pass the item variable to the js to do its work.
Can anyone help solve this issue through either of the above methods or a different method.
I know I can use ternary operators to make it work, but I feel like thats going to get extremely unreadable very quickly.