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
Hello, Raj,
 
Thank you for writing to us.
 
- To set the conditions dynamically, please use setCondition()API call. We have prepared an example for illustration: https://codepen.io/webdatarocks/pen/BaKqLRL.
- We would like to confirm that it is possible. Please have a look at the example with two mentioned conditions added: https://codepen.io/webdatarocks/pen/ZEWqpyx.
 
Hope it helps.
 
Best regards,
WebDataRocks Team