Back to forum

How can I apply conditional formatting for any dimension?

Resolved

 I have seen that I can apply condition formatting only for number values (measures). Is there any way to apply conditional formatting on dimensions.
Example:
I have below json:

[{
"name": "MR. X",
"employeeID": "EMP22",
"age": 24,
"salary": 440000
},{
"name": "MR. Y",
"employeeID": "EMP23",
"age": 32,
"salary": 450300
}]

 From the above datasets I can apply conditional formatting on “age” and “salary” (i.e: already has been defined in webdatarocks). 
   Now my requirements is that , how can I apply same conditional formatting on “name” or “employeeID” values.
 
 
Thanks

1 answer

WebDataRocks Team WebDataRocks March 12, 2019

Hello, Nandan!

Thank you for posting your question.

There is a way to format the dimensions. This can be achieved by redefining CSS styles of specific cells with the customizeCell function. Please refer to the article in our documentation to find out more details about its purpose and the input parameters. 

We’ve prepared a demo for you that shows how to format the cells based on their contents. 

Hope it will be helpful for you.

Best regards,
WebDataRocks Team

Move up