Conditional format object describes conditional formatting rules. It has the following properties:
formula– a condition that can contain the following logical operators:
#valueis used as a reference to the cell value in the condition. Example:
'#value > 2'.
format– the style object that will be applied to a cell if the condition for the cell value is met. Note: when exporting to Excel and PDF, colors should be set to hex color codes.
formatCSS(optional, read-only) – String. Represents a ready to use CSS string of the
formatstyle object. The
formatstyle object has properties with names that differ from CSS. The component transforms
id(optional) – the id of the conditional formatting rule. If the
idproperty is not set, the id for the rule will be set inside the pivot component.
row(optional) – the row index to which the condition should be applied.
column(optional) – the column index to which the condition should be applied.
measure(optional) – the unique measure name to which the condition should be applied.
hierarchy(optional) – the unique hierarchy name to which the condition should be applied.
member(optional) – the unique member 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 set to
true, the condition will be applied to total and subtotal cells only. If it is set to
false, the condition will be applied to regular cells only.
To add new conditional formatting rule use addCondition() API call.
To learn more about the usage of Conditional Format Object check our tutorial.