Level
pentaho.visual.color. Level
The Level
class is String
based enumeration that represents a Level of Measurement, as understood by S. S. Steven and as applied to the visual representation capabilities of a color palette.
Currently, the following color palette levels of measurement are supported:
nominal
- A qualitative measurement level. The lowest in the hierarchy of levels of measurement. A nominal color palette can represent data visually while preserving the distinction between different things and also, possibly, enabling easy association of different, but somehow similar, things. However, a nominal color palette represents data in a way that conveys no preferential order between the various things.See
pentaho.visual.color.palettes.nominalPrimary
for an example of a nominal color palette.quantitative
- Aggregates the interval and ratio levels of measurement, the highest in the hierarchy of levels of measurement. A quantitative color palette can represent data visually while preserving the order between different things. Additionally, it can represent the proportion between quantities (ratios), or, at least, the proportion between differences of quantities (intervals).See
pentaho.visual.color.palettes.quantitativeGray5
for an example of a quantitative color palette.divergent
— A mixed type of color palette that can represent quantitative data while clearly dividing it in two "nominal" regions, separated by a reference value (typically zero).See
pentaho.visual.color.palettes.divergentRyg5
for an example of a divergent color palette.
AMD Module
require(["pentaho/visual/color/level"], function(Level) { /* code goes here */ });
See also: pentaho.visual.color.Palette#level , pentaho.visual.color.PaletteProperty.Type#levels
Extends
Constructor
Name | Description |
---|---|
new Level() |
Classes
Name | Summary |
---|---|
Type | The type class of |
Members
Name | Description |
---|---|
$contentKey : | Gets the content key of the simple value. |
$isValid : | Determines if this value is a valid. |
$key : | Gets the key of the simple value. |
$type : | Gets the type of this instance. |
formatted : | Gets the formatted value of the property. |
value : | Gets the underlying string primitive value of the value. |
Methods
Name | Description |
---|---|
_compare(other) : number Protected | Compares this element to a distinct, non-equal element of the same type according to its relative order. |
_configure(config) Protected | Configures this value with a given distinct and non- |
_configureOrCreate(config) : pentaho.type.Element Protected | Configures this value with a given distinct and non- |
_equals(other) : boolean Protected | Gets a value that indicates if a given distinct, non-null value of the same type represents the same entity. |
_toJSONValue(keyArgs) : UJsonValue Protected | Converts the |
assertValid() | Ensures that the value is valid, and throws the first validation error if it is not. |
clone() : pentaho.type.Simple | Creates a clone of the simple value. |
compare(other) : number | Compares this element to another according to its relative order. |
configure(config) | Configures this value with a given configuration. |
configureOrCreate(config) : pentaho.type.Element | Configures this value with a given configuration, if it is possible. Otherwise creates and returns a new value based on this one, but with the configuration applied. |
equals(other) : boolean | Determines if a given value represents the same entity. |
equalsContent(other) : boolean | Gets a value that indicates if a given equal value has the same content as this one. |
toJSON() : UJsonValue | Creates a top-level JSON specification that describes this instance. |
toSpec(keyArgs) : pentaho.type.spec.UInstance | Creates a specification that describes this value. |
toSpecInContext(keyArgs) : any | Creates a specification that describes this instance. |
toString() : String | Gets a string that represents the current simple value. |
validate() : Array.<<code>pentaho.type.ValidationError > | Determines if this value is valid. |
valueOf() : any | Gets the underlying primitive value of the simple value. |
Constructor Details
new Level() |
---|
Source: javascript/web/pentaho/visual/color/level.js, line 31 See also: pentaho.visual.color.Palette#level , pentaho.visual.color.PaletteProperty.Type#levels |
Members Details
$contentKey: |
---|
Gets the content key of the simple value. Source: javascript/web/pentaho/type/simple.js, line 154 Inherited From: pentaho.type.Simple#$contentKey |
$isValid: |
---|
Determines if this value is a valid. This attribute calls Source: javascript/web/pentaho/type/value.js, line 168 Inherited From: pentaho.type.Value#$isValid |
$key: |
---|
Gets the key of the simple value. The default simple value implementation, returns the result of calling Source: javascript/web/pentaho/type/simple.js, line 144 Inherited From: pentaho.type.Simple#$key See also: pentaho.type.Simple.Type#isEntity |
$type: |
---|
Gets the type of this instance. Source: javascript/web/pentaho/type/value.js, line 334 Overrides: pentaho.type.mixins.DiscreteDomain#$type |
formatted: |
---|
Gets the formatted value of the property. Source: javascript/web/pentaho/type/simple.js, line 94 Inherited From: pentaho.type.Simple#formatted |
value: |
---|
Gets the underlying string primitive value of the value. Source: javascript/web/pentaho/type/string.js, line 35 Inherited From: pentaho.type.String#value |
Methods Details
_compare(other) : number Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Compares this element to a distinct, non-equal element of the same type according to its relative order. This method compares the primitive value of this value with that of Source: javascript/web/pentaho/type/simple.js, line 210 Inherited From: pentaho.type.Simple#_compare
See also: pentaho.type.Simple.Type#comparePrimitiveValues |
_configure(config) Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Configures this value with a given distinct and non- This method can only be called when there is an ambient transaction. The default implementation throws an error if this value's type is Source: javascript/web/pentaho/type/value.js, line 264 Inherited From: pentaho.type.Value#_configure
See also: pentaho.type.Value#configure , pentaho.type.Complex#_configure , pentaho.type.List#_configure |
_configureOrCreate(config) : pentaho.type.Element Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Configures this value with a given distinct and non- This method can only be called when there is an ambient transaction. Source: javascript/web/pentaho/type/element.js, line 175 Inherited From: pentaho.type.Element#_configureOrCreate
See also: pentaho.type.Element#configureOrCreate , pentaho.type.Value#configure |
_equals(other) : boolean Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given distinct, non-null value of the same type represents the same entity. The default implementation considers two values equal if they have the equal keys. Source: javascript/web/pentaho/type/value.js, line 135 Inherited From: pentaho.type.Value#_equals
See also: pentaho.type.Value#equals , pentaho.type.Value#$key |
_toJSONValue(keyArgs) : UJsonValue Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Converts the The default implementation returns Source: javascript/web/pentaho/type/simple.js, line 283 Inherited From: pentaho.type.Simple#_toJSONValue
|
assertValid() | ||||
---|---|---|---|---|
Ensures that the value is valid, and throws the first validation error if it is not. This method calls the Source: javascript/web/pentaho/type/value.js, line 202 Inherited From: pentaho.type.Value#assertValid
|
clone() : pentaho.type.Simple | ||||
---|---|---|---|---|
Creates a clone of the simple value. Source: javascript/web/pentaho/type/simple.js, line 109 Inherited From: pentaho.type.Simple#clone
|
compare(other) : number | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Compares this element to another according to its relative order. Execution proceeds as follows:
Source: javascript/web/pentaho/type/element.js, line 76 Inherited From: pentaho.type.Element#compare
See also: pentaho.type.Element#_compare , pentaho.type.Value#equals |
configure(config) | ||
---|---|---|
Configures this value with a given configuration. This method ensures a transaction exists and then delegates to For more information on the semantics of configuration, see Source: javascript/web/pentaho/type/value.js, line 232 Inherited From: pentaho.type.Value#configure |
Name | Default Value | Summary |
---|---|---|
config : any | The value configuration. |
Name | Description |
---|---|
TypeError | When the value would be changed and its type is |
See also: pentaho.type.Element#configureOrCreate , pentaho.type.Complex#_configure , pentaho.type.List#_configure
configureOrCreate(config) : pentaho.type.Element | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Configures this value with a given configuration, if it is possible. Otherwise creates and returns a new value based on this one, but with the configuration applied. If the given configuration is This method considers configuration to not be possible in the following situations:
If configuration is considered possible, the actual configuration is delegated to the Source: javascript/web/pentaho/type/element.js, line 141 Inherited From: pentaho.type.Element#configureOrCreate
|
equals(other) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if a given value represents the same entity. This method checks if the given value is identical to this one. Otherwise, if not Source: javascript/web/pentaho/type/value.js, line 116 Inherited From: pentaho.type.Value#equals
See also: pentaho.type.Value#_equals |
equalsContent(other) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given equal value has the same content as this one. This method must only be called if the The default implementation returns Source: javascript/web/pentaho/type/value.js, line 152 Inherited From: pentaho.type.Value#equalsContent
See also: pentaho.type.Value#equals |
toJSON() : UJsonValue | ||||
---|---|---|---|---|
Creates a top-level JSON specification that describes this instance. Attributes which do not have a JSON-compatible specification are omitted. Specifically, for inline types, attributes with a function value are not supported. This method simply calls Source: javascript/web/pentaho/type/instance.js, line 210 Overrides: pentaho.type.mixins.DiscreteDomain#toJSON
See also: pentaho.type.Instance#toSpec |
toSpec(keyArgs) : pentaho.type.spec.UInstance | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a specification that describes this value. If an Source: javascript/web/pentaho/type/value.js, line 272 Overrides: pentaho.type.mixins.DiscreteDomain#toSpec |
Name | Default Value | Summary | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
keyArgs : Object Optional | The keyword arguments object. Passed to every value and type serialized within this scope. Please see the documentation of value subclasses for information on additional, supported keyword arguments.
|
Name | Description |
---|---|
pentaho.type.spec.UInstance | A specification of this value. |
toSpecInContext(keyArgs) : any | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Creates a specification that describes this instance. Source: javascript/web/pentaho/type/instance.js, line 190 Overrides: pentaho.type.mixins.DiscreteDomain#toSpecInContext
See also: pentaho.type.Instance#toSpec |
toString() : String | ||||
---|---|---|---|---|
Gets a string that represents the current simple value. Source: javascript/web/pentaho/type/simple.js, line 129 Inherited From: pentaho.type.Simple#toString
|
validate() : Array.<<code>pentaho.type.ValidationError > | ||||
---|---|---|---|---|
Determines if this value is valid. The default implementation does nothing and considers the instance valid. Override to implement a type's specific validation logic. You can use the error utilities in Source: javascript/web/pentaho/type/value.js, line 187 Inherited From: pentaho.type.Value#validate
See also: pentaho.type.Value#$isValid |
valueOf() : any | ||||
---|---|---|---|---|
Gets the underlying primitive value of the simple value. Source: javascript/web/pentaho/type/simple.js, line 120 Inherited From: pentaho.type.Simple#valueOf
|