Class

SpotfireThresholdColoringRules

SpotfireThresholdColoringRules(thresholdColoringRuleDescription)

Coloring rule based on threshold definition and a comparison operator.

Constructor

new SpotfireThresholdColoringRules(thresholdColoringRuleDescription)

Parameters:
Name Type Description
thresholdColoringRuleDescription ColoringRulesDescription
displayName string

Specifies the name of the rule.

color string | ColorDescription

Specifies the color to be used for the rule, in the hexadecimal format, with color name, or the ARGB object.

a number

Opacity factor, between 0 and 255.

r number

Red intensity, between 0 and 255.

g number

Green intensity, between 0 and 255.

b number

Blue intensity, between 0 and 255.

type SpotfireColoringRulesTypes

The type of coloring rules. Can be [equal|not equal to], [greater|less] [than|than or equal].

top String
bottom String
between String
equalTo String
notEqualTo String
greaterThan String
greaterThanOrEqual String
lessThan String
lessThanOrEqual String
booleanExpression String
gradient String
segments String
uniqueValues String
string String
threshold ThresholdColoringRuleDescription

The definition of the threshold conditional value used for evaluating the rules.

type SpotfireConditionalValueTypes

the type of conditional values to be used

min String
max String
average String
median String
literal String
percent String
percentile String
expression String
[ value ] number

used to set the value to be used for comparison

Methods

setComparisonOperator(thresholdColoringRulesType)

Set the comparison operator based on the type of the rules

Parameters:
Name Type Description
thresholdColoringRulesType SpotfireColoringRulesTypes
top String
bottom String
between String
equalTo String
notEqualTo String
greaterThan String
greaterThanOrEqual String
lessThan String
lessThanOrEqual String
booleanExpression String
gradient String
segments String
uniqueValues String
string String

setThreshold(thresholdConfiguration)

Set the threshold based on the threshold definition

Parameters:
Name Type Description
thresholdConfiguration ThresholdColoringRuleDescription
type SpotfireConditionalValueTypes

the type of conditional values to be used

min String
max String
average String
median String
literal String
percent String
percentile String
expression String
[ value ] number

used to set the value to be used for comparison