Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
addCondition(condition: ConditionalFormatObject)
Adds a conditional formatting rule to the report. Learn more in this guide: Conditional formatting.
Use the refresh() API call after to redraw the component and see changes.
Parameter/Type | Description |
---|---|
condition ConditionalFormatObject | The conditional formatting rule that will be added. |
1) If a cell's value is more than 400000
, then apply format
to this cell:
let condition = {
id: 1,
formula: "#value > 400000",
format: {
backgroundColor: "#C5CAE9"
}
};
pivot.addCondition(condition);
pivot.refresh();
Open the example on JSFiddle.
2) This rule will be applied only to the Price
measure's total and subtotal cells. If Price
is between 100000
and 1000000
, then the format
is applied:
let condition = {
measure: "Price",
aggregation: "sum",
isTotal: true,
formula: "AND(#value > 100000, #value < 1000000)",
format: {
backgroundColor: "#FF9800"
}
};
pivot.addCondition(condition);
pivot.refresh();
Check how it works on JSFiddle.
3) If a cell value is empty, then apply format
to this cell:
let condition = {
id: 1,
formula: "isNaN(#value)",
format: {
backgroundColor: "#FFFF11"
}
};
pivot.addCondition(condition);
pivot.refresh();
Open the example on JSFiddle.
getCondition()
getAllConditions()
removeCondition()
removeAllConditions()
refresh()
Conditional formatting tutorial