How to do conditional formatting dynamically?


I have a requirement where user enters thresholds, currently I am able to  achieve using below : 

conditions: [
                  formula: “#value >= 0”,
                  measure: “Time”,
                  format: {
                    “backgroundColor”: “#FFFFFF”,
                    “color”: “#303F9F”,
                    “fontFamily”: “Verdana”,
                    “fontSize”: “12px”

Since these conditions/thresholds are stored in my Database, so is it possible to make them dynamic?
Note : I am using Angular 8 version.
2. Can I do conditional formatting based on two conditions – one is Calculated value and other from Non-Calculated parameter?

1 answer

WebDataRocks Team WebDataRocks September 24, 2020

Hello, Raj,
Thank you for writing to us.

  1. To set the conditions dynamically, please use setCondition() API call. We have prepared an example for illustration:
  2. We would like to confirm that it is possible. Please have a look at the example with two mentioned conditions added:

Hope it helps.
Best regards,
WebDataRocks Team