Skip to Content
ClassesFConditionalFormattingBuilder

Class: FConditionalFormattingBuilder

Methods

build()

build(): IConditionFormattingRule<IConditionalFormattingRuleConfig>

Returns

IConditionFormattingRule<IConditionalFormattingRuleConfig>


setAverage()

setAverage(operator): ConditionalFormatHighlightRuleBuilder

Set average rule

Parameters

ParameterTypeDescription
operatorIAverageHighlightCell

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatHighlightRuleBuilder


setBackground()

setBackground(color?): ConditionalFormatHighlightRuleBuilder

Sets the background color

Parameters

ParameterTypeDescription
color?string

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setBold()

setBold(isBold): ConditionalFormatHighlightRuleBuilder

Set Bold

Parameters

ParameterTypeDescription
isBoldboolean

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setColorScale()

setColorScale(config): ConditionalFormatColorScaleRuleBuilder

Set colorScale rule

Parameters

ParameterTypeDescription
configIColorScale

Returns

ConditionalFormatColorScaleRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setDataBar()

setDataBar(config): ConditionalFormatDataBarRuleBuilder

Set dataBar rule

Parameters

ParameterTypeDescription
config{ isGradient: boolean; isShowValue: boolean; max: IValueConfig; min: IValueConfig; nativeColor: string; positiveColor: string; }
config.isGradient?boolean
config.isShowValue?boolean
config.maxIValueConfig
config.minIValueConfig
config.nativeColorstring
config.positiveColorstring

Returns

ConditionalFormatDataBarRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setDuplicateValues()

setDuplicateValues(): ConditionalFormatHighlightRuleBuilder

Set duplicateValues rule

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatHighlightRuleBuilder


setFontColor()

setFontColor(color?): ConditionalFormatHighlightRuleBuilder

Sets the font color

Parameters

ParameterTypeDescription
color?string

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setIconSet()

setIconSet(config): ConditionalFormatIconSetRuleBuilder

Set iconSet rule

Parameters

ParameterTypeDescription
config{ iconConfigs: IIconSet; isShowValue: boolean; }
config.iconConfigsIIconSet
config.isShowValueboolean

Returns

ConditionalFormatIconSetRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setItalic()

setItalic(isItalic): ConditionalFormatHighlightRuleBuilder

Set the text to italic

Parameters

ParameterTypeDescription
isItalicboolean

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setRank()

setRank(config): ConditionalFormatHighlightRuleBuilder

Set rank rule

Parameters

ParameterTypeDescription
config{ isBottom: boolean; isPercent: boolean; value: number; }
config.isBottomboolean
config.isPercentboolean
config.valuenumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatHighlightRuleBuilder


setStrikethrough()

setStrikethrough(isStrikethrough): ConditionalFormatHighlightRuleBuilder

Set the strikethrough

Parameters

ParameterTypeDescription
isStrikethroughboolean

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setUnderline()

setUnderline(isUnderline): ConditionalFormatHighlightRuleBuilder

Set the underscore

Parameters

ParameterTypeDescription
isUnderlineboolean

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


setUniqueValues()

setUniqueValues(): ConditionalFormatHighlightRuleBuilder

Set uniqueValues rule

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatHighlightRuleBuilder


whenCellEmpty()

whenCellEmpty(): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the cell is empty.

Returns

ConditionalFormatHighlightRuleBuilder


whenCellNotEmpty()

whenCellNotEmpty(): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the cell is not empty

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenDate()

whenDate(date): ConditionalFormatHighlightRuleBuilder

Highlight when the date is in a time period, custom time is not supported.

Parameters

ParameterTypeDescription
dateCFTimePeriodOperator

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenFormulaSatisfied()

whenFormulaSatisfied(formulaString): ConditionalFormatHighlightRuleBuilder

Sets a conditional formatting rule to fire when a given formula evaluates to true.

Parameters

ParameterTypeDescription
formulaStringstringformulaString start with’ = ‘

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberBetween()

whenNumberBetween(start, end): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when a number is between two specified values or equal to one of them.

Parameters

ParameterTypeDescription
startnumber
endnumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberEqualTo()

whenNumberEqualTo(value): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the number equals the given value

Parameters

ParameterTypeDescription
valuenumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberGreaterThan()

whenNumberGreaterThan(value): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the number is greater than the given value

Parameters

ParameterTypeDescription
valuenumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberGreaterThanOrEqualTo()

whenNumberGreaterThanOrEqualTo(value): ConditionalFormatHighlightRuleBuilder

Sets a conditional formatting rule to fire when a number is greater than or equal to a given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberLessThan()

whenNumberLessThan(value): ConditionalFormatHighlightRuleBuilder

Sets a conditional formatting rule to fire when the number is less than the given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberLessThanOrEqualTo()

whenNumberLessThanOrEqualTo(value): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the value is less than or equal to the given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberNotBetween()

whenNumberNotBetween(start, end): ConditionalFormatHighlightRuleBuilder

Sets a conditional formatting rule to fire when a number is not between two specified values and is not equal to them.

Parameters

ParameterTypeDescription
startnumber
endnumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenNumberNotEqualTo()

whenNumberNotEqualTo(value): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when a number does not equal a given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenTextContains()

whenTextContains(text): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the input contains the given value.

Parameters

ParameterTypeDescription
textstring

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenTextDoesNotContain()

whenTextDoesNotContain(text): ConditionalFormatHighlightRuleBuilder

Sets a conditional formatting rule to fire when the input does not contain the given value.

Parameters

ParameterTypeDescription
textstring

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenTextEndsWith()

whenTextEndsWith(text): ConditionalFormatHighlightRuleBuilder

Sets a conditional formatting rule to fire when input ends with a specified value.

Parameters

ParameterTypeDescription
textstring

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenTextEqualTo()

whenTextEqualTo(text): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the input equals the given value.

Parameters

ParameterTypeDescription
textstring

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder


whenTextStartsWith()

whenTextStartsWith(text): ConditionalFormatHighlightRuleBuilder

Sets the conditional formatting rule to fire when the input value begins with the given value.

Parameters

ParameterTypeDescription
textstring

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder