Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

How to customize cell with condition in value

Answered
Yato asked on March 17, 2020

Hi,
I want to customize cells (change background and color) with a condition like this. https://jsfiddle.net/j0ptf31s/
with Angular and just add required in the condition in config not add more function.
 
Thanks you.

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 17, 2020

Hello, Yato,
 
Thank you for reaching out to us.
 
We would like to kindly draw your attention to the conditional format object that is dedicated to describe conditional formatting rules. In case the desired condition has to be included in the configuration, it should be specified as an element of a conditions array. Such an array itself is a property of the report object.
 
E.g., an example you have provided contains the following code snippet:

"conditions": [
  {
    "formula": "#value > 500 AND #value < 600",
    "isTotal": false,
    "format": {
      "backgroundColor": "#99CC66",
      "color": "#000000",
      "fontFamily": "Arial",
      "fontSize": "12px"
    }
  }
]

The code above demonstrates specifying the conditional format object as an element of conditions array.
 
We highly recommend checking out our tutorial dedicated to conditional formatting. Detailed information about the conditional format object can be found in our documentation as well.
 
An approach does not differ for Angular. Simply specify an appropriate report object with its conditions property configured. For a quick start, we recommend checking out our GitHub sample demonstrating integration with Angular 4+. It may also be useful for you to find out more about the recommended way of integration with Angular from our tutorial.
 
We hope it helps.
 
Do not hesitate to contact us in case additional questions occur.
 
Kind regards,
Illia

Please login or Register to Submit Answer