Constructor
new SpotfireColoringTable(coloringDescription)
Parameters:
Name | Type | Description |
---|---|---|
coloringDescription
|
coloringTableDescription ▼ | |
name
|
String | The name of the color scheme grouping |
mappings
|
Array.<String> | Collection of column names on which to apply coloring (displayed in the table plot). |
[ colorMode ]
|
SpotfireColorModes {Enum} ▼ | Specifies in which color mode to set up the color scheme. Which modes are available depend on the columns in the color scheme grouping. For groupings containing continuous columns, you can select one of the following color modes: Gradient, Segments, Fixed, or Unique values. For categorical columns, you can select either Unique values or Fixed color mode. |
Enum options: fixed, categorical, gradient, segments, uniqueValues | ||
defaultColor
|
String | Object | Specifies the default color to be used, in the hexadecimal format, with color name, or the ARGB object. Especially used with the 'Fixed' color mode. |
[ oneScalePer ]
|
SpotfireOneScalePer {Enum} ▼ | Specifies whether there should be one separate scale for each column in the color scheme grouping, or if one common scale should apply to all the columns. |
Enum options: column, trellis | ||
[ applyTo ]
|
SpotfireApplyTo {Enum} ▼ | Specifies whether the coloring should be applied to the cell backgrounds, or the cell texts. |
Enum options: background, text | ||
[ templateLibraryPath ]
|
String | The path in the library of the file that contains a color scheme to be applied to the visualization. |
[ templateUrl ]
|
String | The URL of the file that contains a color scheme to be applied to the visualization. |
[ templateName ]
|
String | The name of the document color scheme. |
[ colorRules ]
|
Object | Array.<Object> | Array of color rules to apply on the visualization. |
displayName
|
String | Optionally specify a descriptive name for the rule. The name is used to identify the rule in the Visualization Properties dialog, and it can be displayed in the legend of the visualization. Leave the field blank if you want to use the default rule name. |
color
|
String | 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. |
[ 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 {Enum} ▼ | Specifies which rule type to add. Which types are available depends on the data type of the column, or hierarchy that the rule is applied to. |
Enum options: top, bottom, between, equalTo, notEqualTo, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, booleanExpression, gradient, segments, uniqueValues, string | ||
value
|
Number | String | Defines the value the rule should apply to. The available options depend on the rule type. |
startValue
|
Number | Only available for the "Between" type. Specifies the minimum value the rule should apply to. |
endValue
|
Number | Only available for the "Between" type. Specifies the maximum value the rule should apply to. |
expression
|
String | Only available for the "Boolean expression" type. Specifies the expression the rule should apply to, all the items for which the expression is true will get the specified color. |
[ colorPoints ]
|
Object | Array.<Object> | Array of anchor points to be applied on the visualization. Available for continuous columns only. |
type
|
SpotfireColoringRulesTypes {Enum} ▼ | Specifies which point type to add. Only types for continuous columns are available. |
Enum options: top, bottom, between, equalTo, notEqualTo, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, booleanExpression, gradient, segments, uniqueValues, string | ||
value
|
Number | String | Defines the value the rule should apply to. The available options depend on the point type. |
color
|
String | Object | Specifies the color to be used for the anchor point, in the hexadecimal format, with color name, or the ARGB object. |
Examples
const coloringDescription = {
name: 'IDNUMBER',
mappings: ['IDNUMBER'],
colorMode: 'Fixed',
defaultColor: '#FF0000'
}
const coloringDescription = {
name: 'IDNUMBER',
mappings: ['IDNUMBER'],
colorMode: 'Fixed',
defaultColor: { a: 255, r: 255, g: 0, b: 0 }
}
const coloringDescription = {
name: 'New grouping 1',
mappings: ['CLUSTER', 'CL_SIZE'],
colorMode: 'Categorical',
applyTo: 'Text',
colorRules: [{
type: 'Equal to',
value: 1,
color: '#FF0000'
}]
}