I have some decimal value columns in a grid where I want to have a variable precision based on the values of the decimal. Specifically, decimal places of precision should be 0 if the value is > 9.5, precision should be 1 if the number is between 0.5 and 9.5 & 2 otherwise. Currently, I am defining the precision in the column definitions like this:
"columns": [
{
"name": "exposure",
"type": "DECIMAL",
"title": "Exposure",
"precision": 2,
"width": 77
},
{
"name": "total_risk",
"type": "DECIMAL",
"title": "Total Risk",
"agg_name": "Total Risk",
"precision": 0,
"width": 78
}]
Does ag grid provide any functionality like this. I don't see anything in the official documentation