Closed monikadixit closed 3 years ago
You got the syntax wrong
cellStyle = {(background, value, min, max, data, x, y) => {
if (value > 53) {
return {
background: 'rgba(0, 151, 230, 0.3)',
fontSize: '11.5px',
color: '#444'
};
}
return {
// Different style
};
}}
Thank you ! , I solved it little differently
cellStyle={(background, value, min, max, data, x, y) => ({ //background:
rgba(${(99.990-value)1000000}, ${(value-99.90)30000},0 , 0.7), background: setRGB(value), fontSize: "11.5px", color: "#444" })}
function setRGB(value){ if(value >= 99.99){ return
rgba(0,255,0,0.7)} }
Hi , I am trying to put different colors on the basis of value. I tried following but having errors. Could you please tell me how I can use conditional cell styling formatting ?