PivotAnalysisBase

28 Sep 20171 minute to read

This section contains the properties and methods available for all the Pivot Controls operated in client mode with Relational data.

Requires

  • module:jQuery-3.0.0.min.js
  • module:ej.core.js
  • module:ej.data.js
  • module:ej.touch.js
  • module:ej.pivot.common.js
  • module:ej.pivotanalysis.base.js

Methods

setFieldCaptions()

This function sets the caption for all fields in datasource is it is not set.

Example:

  • TS
  • export AppComponent {
        
      ngAfterViewInit(){
    
         ej.PivotAnalysis.setFieldCaptions(dataSourceObj);
      }
     }

    getTreeViewData()

    This function returns the data required to render the field list formed from the raw data source.

    Returns:

    array

    Example:

  • TS
  • export AppComponent {
        
      ngAfterViewInit(){
    
         let treeViewData = ej.PivotAnalysis.getTreeViewData(dataSourceObj);
      }
     }

    pivotEnginePopulate()

    This function forms the pivot engine and JSON data required to render the Pivot Controls from the datasource.

    Returns:

    object

    Example:

  • TS
  • export AppComponent {
        
      ngAfterViewInit(){
    
         let jsonData = ej.PivotAnalysis.pivotEnginePopulate(pivotControlModel);
      }
     }

    getMembers()

    This function returns the list of members available in the given field.

    Returns:

    array

    Example:

  • TS
  • export AppComponent {
        
      ngAfterViewInit(){
    
         let fieldMembers = ej.PivotAnalysis.getMembers(fieldObj);
      }
     }