EaxAnalyzer.clearDimItems

Syntax

clearDimItems();

Description

The clearDimItems method removes all loaded dimension elements in an express report.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Get identifier only for the dimensions that contain elements. Then clear all the elements and try to get these dimensions:

var eaxAnalyzer = expressBox.getSource();
// Function used to output identifiers of dimensions with elements
var getDimItemsInfo = function () {    
    console.log("Dimensions with elements: ");
    var isExist = false;    
    var dims = eaxAnalyzer.getDims();    
    for (var i = 0; i < dims.length; i++) {        
        var dimItems = dims[i].getChildEls("");        
        if (dimItems != null) {
            console.log(dims[i].getOdId().id);
            isExist = true;        
        }    
    }  
    if (!isExist) {
        console.log("Elements are missing");  
    }
}
// Output identifiers of dimension with elements
getDimItemsInfo();
// Clear elements of all dimensions
eaxAnalyzer.clearDimItems();
// Repeat output
getDimItemsInfo();

After executing the example the browser console displays identifiers of the dimensions that contain any elements (before and after executing the clearDimItems method):

Element dimensions:

FILOBFIDCJOBEOAEBEFECHFLCDGNDHBEMKGFPNMEMNPFGHNN!M!S!EFDHAPCMGCJOBEOAEDPHNLNBBBAGIOKBEJLDAGOHPIGJDFFFB!1824

FILOBFIDCJOBEOAEBEFECHFLCDGNDHBEMKGFPNMEMNPFGHNN!M!S!EFDHAPCMGCJOBEOAEDPHNLNBBBAGIOKBEJLDAGOHPIGJDFFFB!2038

Element dimensions:

No elements

See also:

EaxAnalyzer