Base
pentaho.visual.scene Base
The Scene
class represents one distinct visual state which is represented visually by one or more visual elements.
Scenes are not needed to implement visualization views
. However, their use simplifies their implementation in many use cases.
Scenes have a map of visual variables, vars
whose values are inherited from parent to child scenes.
To create scenes, most view implementations can simply use the [scene.Base.buildScenesFlat] method. This method creates one parent scene having one child scene per row of the model's dataset. In child scenes, for each visual role there will be a correspondingly named variable having the value of the visual role.
For handling user interaction, the scene instances' createFilter
method provides an easy way to create a filter that selects the data from which the scene was generated based on its distinguishing field values. This filter can then be passed to a data action
such as Select
or Execute
.
When communicating with external parties, field values must be used and visual variable values are not generally meaningful. The invert
method allows directly obtaining the distinguishing field values that are associated with a scene.
Extends
Constructor
Name | Description |
---|---|
new Base(parent, model) | Creates a scene instance. |
Members
Name | Description |
---|---|
children : Array.<pentaho.visual.scene.Base> | Gets the array of child scenes. |
index : number | Gets the child index of this scene, if it has a parent, or |
model : pentaho.visual.Model | Gets the associated visualization model. |
parent : pentaho.visual.scene.Base | Gets the parent scene, if any, or |
root : pentaho.visual.scene.Base | Gets the root scene of the tree that this scene belongs to. |
Methods
Name | Description |
---|---|
buildScenesFlat(model) : pentaho.visual.scene.Base Static | Builds a flat, single-level scene tree according to the data and visual roles of a given model. |
createFilter() : pentaho.data.filter.Abstract | Creates a filter that selects the data represented by this scene. |
invert(keyArgs) : Object.<string, pentaho.data.ICell> | Gets a data cells map which corresponds to the values of visual role variables of this scene. |
Constructor Details
new Base(parent, model) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Creates a scene instance. Source: javascript/web/pentaho/visual/scene/Base.js, line 64
|
Members Details
children: Array.<pentaho.visual.scene.Base> |
---|
Gets the array of child scenes. The returned array cannot be modified directly. Source: javascript/web/pentaho/visual/scene/Base.js, line 110 |
index: number |
---|
Gets the child index of this scene, if it has a parent, or Source: javascript/web/pentaho/visual/scene/Base.js, line 100 |
model: pentaho.visual.Model |
---|
Gets the associated visualization model. Source: javascript/web/pentaho/visual/scene/Base.js, line 128 |
parent: pentaho.visual.scene.Base |
---|
Gets the parent scene, if any, or Source: javascript/web/pentaho/visual/scene/Base.js, line 92 |
root: pentaho.visual.scene.Base |
---|
Gets the root scene of the tree that this scene belongs to. Source: javascript/web/pentaho/visual/scene/Base.js, line 118 |
Methods Details
buildScenesFlat(model) : pentaho.visual.scene.Base Static | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Builds a flat, single-level scene tree according to the data and visual roles of a given model. This method creates one parent scene having one child scene per row of the Source: javascript/web/pentaho/visual/scene/Base.js, line 199
|
createFilter() : pentaho.data.filter.Abstract | ||||
---|---|---|---|---|
Creates a filter that selects the data represented by this scene. This method provides an easy way to create a filter that selects the data that this scene visually represents based on its distinguishing field values. This filter can then be passed to a In certain circumstances, the returned value may be Source: javascript/web/pentaho/visual/scene/Base.js, line 164
|
invert(keyArgs) : Object.<string, pentaho.data.ICell> | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets a data cells map which corresponds to the values of visual role variables of this scene. When communicating with external parties, field values must be used and visual variable values are not generally meaningful. Use this method to obtain the distinguishing field values represented by this scene. Source: javascript/web/pentaho/visual/scene/Base.js, line 183
See also: pentaho.visual.scene.util.invertVars |