Class actuate.xtabanalyzer.Dimension
Description
The Dimension class specifies a cross tab Dimension object.
Constructor
Syntax
actuate.xtabanalyzer.Dimension( )
The Dimension class is used to specify a Dimension object.
Function summary
Table 5‑4 lists actuate.xtabanalyzer.Dimension functions.
Table 5‑4 actuate.xtabanalyzer.Dimension functions
Function | Description |
addLevel( ) | Adds the level to the dimension |
getAxisType( ) | Returns the axis type |
getDimensionName( ) | Returns the dimension name |
getIndex( ) | Returns the index of the dimension |
getLevels( ) | Returns cross tab levels |
getNewAxisType( ) | Returns the new axis type |
getNewIndex( ) | Returns the new index |
setAxisType( ) | Sets the axis type |
setDimensionName( ) | Sets the dimension name |
setIndex( ) | Sets the index |
setLevels( ) | Sets the levels |
setNewAxisType( ) | Sets the new axis type |
setNewIndex( ) | Sets the new index axis type |
actuate.xtabanalyzer.Dimension.addLevel
Syntax
void Dimension.addLevel(actuate.xtabanalyzer.Level level)
Adds a level to the dimension.
Parameters
level
actuate.xtabanalyzer.Level object. A level to add to the dimension.
Example
This example adds a level to a dimension:
function addLvl(dimension,levelName){
var level = new actuate.xtabanalyzer.Level( );
level.setLevelName(levelName);
dimension.addLevel(level);
}
actuate.xtabanalyzer.Dimension.getAxisType
Syntax
integer Dimension.getAxisType( )
Returns the axis type for the dimension.
Returns
Integer. The axis type can be one of the following values:

actuate.xtabanalyzer.Dimension.COLUMN_AXIS_TYPE

actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPE
Example
This example retrieves and sets the axis type:
function swapAxis(dimension){
if (dimension.getAxisType( ) == actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPE){
dimension.setNewAxisType(
actuate.xtabanalyzer.Dimension.COLUMN_AXIS_TYPE);
} else {
dimension.setNewAxisType(
actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPE);
}
}
actuate.xtabanalyzer.Dimension.getDimensionName
Syntax
string Dimension.getDimensionName( )
Returns the name of this dimension.
Returns
String. The dimension name.
Example
This example retrieves the dimension name:
function getDimName(dimension){
if(dimension){
return dimension.getDimensionName( );
}
return null;
}
actuate.xtabanalyzer.Dimension.getIndex
Syntax
integer Dimension.getIndex( )
Returns the dimension index.
Returns
Integer. The dimension index.
Example
This example retrieves and increments the index:
function incrementIndex(dimension){
var newIndex = dimension.getIndex( ) + 1;
dimension.setNewIndex(newIndex);
}
actuate.xtabanalyzer.Dimension.getLevels
Syntax
Returns the dimension levels.
Returns
actuate.xtabanalyzer.Level[ ]. Array of dimension levels.
Example
This example retrieves the dimension levels:
function getDimLevels(dimension){
if(dimension){
return dimension.getLevels( );
}
return null;
}
actuate.xtabanalyzer.Dimension.getNewAxisType
Syntax
integer Dimension.getNewAxisType( )
Returns the new axis type.
Returns
Integer containing the new axis type.
Example
This example retrieves the new axis type:
function getNewDimAxis(dimension){
if(dimension){
return dimension.getNewAxisType( );
}
return null;
}
actuate.xtabanalyzer.Dimension.getNewIndex
Syntax
integer Dimension.getNewIndex( )
Returns the new index.
Returns
Integer. The new index.
Example
This example retrieves the new index:
function getNewDimIndex(dimension){
if(dimension){
return dimension.getNewIndex( );
}
return null;
}
actuate.xtabanalyzer.Dimension.setAxisType
Syntax
void Dimension.setAxisType(integer axisType)
Sets the axis type when creating a new dimension. Use setNewAxisType( ) to change a dimension that already exists.
Parameters
axisType
The axis type for the dimension. The axis type has the following legal values:

actuate.xtabanalyzer.Dimension.COLUMN_AXIS_TYPE

actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPE
Example
This example sets the axis type for a new dimension:
function setRowAxis(dimension){
dimension.setAxisType(
actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPE);
}
actuate.xtabanalyzer.Dimension.setDimensionName
Syntax
void Dimension.setDimensionName(string dimensionName)
Sets the name for a dimension during its creation.
Parameters
dimensionName
String. The name of the dimension.
Example
This example sets the dimension name to a value taken from a page element:
function setDimensionName(dimension){
var dimensionName = document.getElementById("dimensionName").value;
dimension.setDimensionName(dimensionName);
}
actuate.xtabanalyzer.Dimension.setIndex
Syntax
void Dimension.setIndex(integer index)
Sets the index for the dimension.
Parameters
index
The index of the dimension.
Example
This example sets the dimension index to a value taken from a page element:
function setDimensionIndex(dimension){
var dimensionIndex = document.getElementById("dimensionIndex").value;
dimension.setIndex(dimensionIndex);
}
actuate.xtabanalyzer.Dimension.setLevels
Syntax
void Dimension.setLevels(xtabanalyzer.Level[ ] levels)
Sets levels for the dimension.
Parameters
levels
Array of xtabanalyzer.Level objects representing the levels for the dimension.
Example
This example sets the dimension levels:
function setDimensionLevels(dimension,levels){
if (dimension && levels){
dimension.setLevels(levels);
}
}
actuate.xtabanalyzer.Dimension.setNewAxisType
Syntax
void Dimension.setNewAxisType(integer newAxisType)
Sets the new axis type.
Parameters
newAxisType
Integer. The new axis type.
Example
This example retrieves and changes the axis type:
function swapAxis(dimension){
if (dimension.getAxisType( ) ==
actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPE){
dimension.setNewAxisType(
actuate.xtabanalyzer.Dimension.COLUMN_AXIS_TYPE);
} else {
dimension.setNewAxisType(
actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPE);
}
}
actuate.xtabanalyzer.Dimension.setNewIndex
Syntax
void Dimension.setNewtIndex(integer newIndex)
Sets the new index.
Parameters
newIndex
Integer. The new index.
Example
This example retrieves and increments the index:
function incrementIndex(dimension){
var newIndex = dimension.getIndex( ) + 1;
dimension.setNewIndex(newIndex);
}