util
pentaho.visual.role. util
AMD Module
require(["pentaho/visual/role/util"], function(util) { /* code goes here */ });
The util
namespace contains functions for common tasks around dealing with visual roles.
Source: javascript/web/pentaho/visual/role/util.js, line 25
Methods
Name | Description |
---|---|
getBestRoleForAddingField(vizModel, fieldName, keyArgs) : Array.<pentaho.visual.role.IAddUsage> | Gets the "best" visual role usage for adding a field to a visualization model. |
getHierarchyNextOrdinal(vizModel, hierarchyName) : number | Gets the next unused ordinal of a given hierarchy. |
getRoleFirstHierarchy(vizModel, roleName) : string | Gets the name of the first hierarchy of a field mapped to a visual role. |
getValidRolesForAddingField(vizModel, fieldName, keyArgs) : Array.<pentaho.visual.role.IAddUsage> | Gets a list of visual role usages for valid additions of a field to a visualization model |
testAddField(vizModel, roleName, fieldName, keyArgs) : pentaho.visual.role.IAddUsage | Tests if it would be valid to add a field to a visual role at a specific position. |
testAddFieldAtAutoPosition(vizModel, roleName, fieldName, keyArgs) : pentaho.visual.role.IAddUsage | Tests if it would be valid to add a field to a visual role, at one of the possible positions. |
Methods Details
getBestRoleForAddingField(vizModel, fieldName, keyArgs) : Array.<pentaho.visual.role.IAddUsage> | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the "best" visual role usage for adding a field to a visualization model. This method selects one of the visual role usages returned by
Source: javascript/web/pentaho/visual/role/util.js, line 297
See also: pentaho.visual.role.util.testAddFieldAtAutoPosition |
getHierarchyNextOrdinal(vizModel, hierarchyName) : number | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the next unused ordinal of a given hierarchy. When the model has no defined Source: javascript/web/pentaho/visual/role/util.js, line 433
|
getRoleFirstHierarchy(vizModel, roleName) : string | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the name of the first hierarchy of a field mapped to a visual role. Source: javascript/web/pentaho/visual/role/util.js, line 403
|
getValidRolesForAddingField(vizModel, fieldName, keyArgs) : Array.<pentaho.visual.role.IAddUsage> | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets a list of visual role usages for valid additions of a field to a visualization model This method tests adding the field to each of the visualization model's visual roles, by delegating to Source: javascript/web/pentaho/visual/role/util.js, line 240
See also: pentaho.visual.role.util.testAddFieldAtAutoPosition |
testAddField(vizModel, roleName, fieldName, keyArgs) : pentaho.visual.role.IAddUsage | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tests if it would be valid to add a field to a visual role at a specific position. This method allows moving, appending/inserting or replacing a field in a visual role. When valid, returns the corresponding visual role usage. Source: javascript/web/pentaho/visual/role/util.js, line 71
See also: pentaho.visual.role.util.testAddFieldAtAutoPosition |
testAddFieldAtAutoPosition(vizModel, roleName, fieldName, keyArgs) : pentaho.visual.role.IAddUsage | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tests if it would be valid to add a field to a visual role, at one of the possible positions. This method is similar to When valid, returns the corresponding visual role usage. Source: javascript/web/pentaho/visual/role/util.js, line 196
See also: pentaho.visual.role.util.testAddField |