Menu
Download Free Trial
Table of contents

Conditional Format Object

Conditional format object describes conditional formatting rules. It has the following properties:

  • formula – condition that can contain AND, OR, ==, !=, >, <, >=, <=, +, -, *, /, isNaN(), !isNaN(). #value is used to address the cell value in condition. Example: '#value > 2'.
  • format – style object that will be applied to a cell if the condition for the cell value is met. Please note that for export to Excel and PDF colors should be set as hex color codes.
  • formatCSS (optional) – String. Represents ready to use CSS string of format style object. format style object has properties with names that differ from CSS. The component transforms format to formatCSS.
  • id (optional) – id of the conditional formatting rule. If id property is not set, the id for the rule will be set inside Pivot component.
  • row (optional) – row index to which the condition should be applied.
  • column (optional) – column index to which the condition should be applied.
  • measure (optional) – measure unique name to which the condition should be applied.
  • hierarchy (optional) – hierarchy unique name to which the condition should be applied.
  • member (optional) – member unique name to which the condition should be applied.
  • isTotal (optional) – Boolean. If it is not defined, the condition will be applied to all cells. If it is true, the condition will be applied to totals and subtotals cells only. If it is false, the condition will be applied to regular cells only.

To add new conditional formatting rule use addCondition() API call.