Posted 19 May 2019, 4:12 pm EST
Dev team is working is on the serialization issue, we will let you know when once the issue is fixed.
We apologize for the inconvenience due to the lack of examples in the docs. We have forwarded the request to the concerned team to add more examples on the topic. Till then you may refer to the examples for validation. Both validator and ConditionRule uses the same condition instance, so the method for creation of the condition is the same for both validator and condition rule.
Please refer to the following code snippet which demonstrates how we could isEmpty condition rule:
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo, expected: ""});
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.conditionRuleBase);
rule.condition(nCondition);
rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
var style1 = new GC.Spread.Sheets.Style();
style1.backColor = "red";
rule.style(style1);
sheet.conditionalFormats.addRule(rule);