Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • Introduction

    Flexmonster Pivot Table & Charts Component has convenient full-functional JavaScript API to embed the component into web applications.

    This API documentation describes objects, calls and events.

    The following example illustrates how to embed the component via initial new Flexmonster() call:

    <div id="pivotContainer">The component will appear here</div>
    <script src="flexmonster/flexmonster.js"></script>
    
    <script>
      let pivot = new Flexmonster({
        container: "pivotContainer",
        componentFolder: "node_modules/flexmonster/",
        toolbar: true
      });
    </script>

    Open the example on JSFiddle or read more about embedding Flexmonster Component: new Flexmonster().

    List of objects

    Object Description
    ReportObject Contains all the possible aspects of pivot tables and pivot charts configuration.
    DataSourceObject Contains information about the data source.
    FormatObject Defines the way how numeric values are formatted in the component.
    ConditionalFormatObject Describes conditional formatting rules.
    MappingObject Contains information about field data types, captions, multi-level hierarchies, and other view configurations of the data source.
    SliceObject Defines what data subset from the data source is going to be shown in the report.
    FilterObject Contains filtering information.
    OptionsObject Used to specify appearance and functionality available for customers.
    TableSizesObject Contains information about table sizes.
    MeasureIdentifierObject An auxiliary object that is used to identify measures when using different functionality.
    GlobalObject Used to set options that will be applied to all reports.
    CellDataObject Contains information about the cell.
    ChartDataObject Contains information about the chart segment.
    ChartLegendDataObject Contains information about the chart legend element.
    ToolbarObject Contains information about the Toolbar.
    ShareReportConnectionObject Contains the configuration needed to share a report.
    FieldListItemObject Contains information about the Field List item.
    ResultHierarchyObject An auxiliary object that is used to describe fields selected in the report.
    ResultMeasureObject An auxiliary object that is used to describe measures available in the report.

    List of API calls

    API call Description
    addCalculatedMeasure Adds calculated measure.
    addCondition Adds a conditional formatting rule.
    alert Shows an alert pop-up window with a custom message.
    clear Clears the component’s data and view.
    clearFilter Clears the filter applied previously to the specified hierarchy.
    clearXMLACache Requests Microsoft Analysis Services to clear the cache.
    closeFieldsList Closes the Field List.
    collapseAllData Collapses all nodes and drills up all levels of all hierarchies.
    collapseCell Collapses a specific node on the grid and charts.
    collapseData Collapses all nodes of the specified hierarchy.
    connectTo Connects to the data source and clears the current report.
    customizeAPIRequest Allows customizing the request before it is sent to a server.
    customizeCell Allows customizing of separate cells.
    customizeChartElement Allows customizing separate chart elements in Flexmonster Charts.
    customizeContextMenu Allows customizing context menu.
    dispose Prepares the pivot table instance to be deleted with the browser’s garbage collection.
    drillDownCell Drills down a specific hierarchy level on the grid and charts.
    drillUpCell Drills up a specific hierarchy level on the grid and charts.
    expandAllData Expands all nodes and drills down all levels of all hierarchies.
    expandCell Expands a specific node on the grid and charts.
    expandData Expands all nodes of the specified hierarchy.
    exportTo Exports the current view to Excel, PDF, CSV, HTML, or image format.
    getAllConditions Returns a list of conditional formatting rules of the report.
    getAllHierarchies Returns a list of all available hierarchies.
    getAllHierarchiesAsync The async equivalent of getAllHierarchies.
    getAllMeasures Returns a list of all available measures.
    getAllMeasuresAsync The async equivalent of getAllMeasures.
    getCell Returns information about cell by row and column indexes.
    getColumns Returns a list of hierarchies selected in the report slice for columns.
    getColumnsAsync The async equivalent of getColumns.
    getCondition Returns a conditional formatting rule by id.
    getFilter Returns the filtered members for the specified hierarchy.
    getFlatSort Returns an array of objects defining the sorting on the flat grid.
    getFormat Returns the FormatObject of a default number format or the number format for the specified measure.
    getMeasures Returns a list of the selected measures in the report.
    getMeasuresAsync The async equivalent of getMeasures.
    getMembers Returns a list of members for the specified hierarchy.
    getMembersAsync The async equivalent of getMembers.
    getOptions Returns the OptionsObject with component’s options.
    getReportFilters Returns a list of hierarchies selected in the report slice for Report Filters.
    getReportFiltersAsync The async equivalent of getReportFilters.
    getReport Returns the ReportObject which describes the current report.
    getRows Returns a list of hierarchies selected in the report slice for rows.
    getRowsAsync The async equivalent of getRows.
    getSelectedCell Returns information about selected cell.
    getSort Returns the sort type which is applied to the hierarchy.
    getTableSizes Returns table sizes that are set for the component.
    getXMLACatalogs Obtains a list of all available catalogs on a given data source.
    getXMLACatalogsAsync The async equivalent of getXMLACatalogs.
    getXMLACubes Obtains a list of all available cubes on a given data source.
    getXMLACubesAsync The async equivalent of getXMLACubes.
    getXMLADataSources Obtains a list of all data sources by given URL for XMLA connect.
    getXMLADataSourcesAsync The async equivalent of getXMLADataSources.
    getXMLAProviderName Returns dataSourceType for given proxyUrl.
    getXMLAProviderNameAsync The async equivalent of getXMLAProviderName.
    load Loads report JSON file from the specified URL.
    off Removes JS handlers for specified event.
    on Sets a JS function for the specified event.
    open Opens local report file.
    openCalculatedValueEditor Opens the calculated value pop-up window editor.
    openFieldsList Opens the Field List.
    openFilter Opens the filter pop-up window for the specified hierarchy.
    print Prints the current view via the OS print manager.
    refresh Redraws the component.
    removeAllCalculatedMeasures Removes all calculated measures.
    removeAllConditions Removes all conditional formatting rules.
    removeCalculatedMeasure Removes the calculated measure by measure unique name.
    removeCondition Removes the conditional formatting rule by id.
    removeSelection Removes a selection from cells on the grid.
    runQuery Runs a query with specified rows, columns, measures and report filters from the SliceObject and displays the result data.
    save Saves your current report to a specified location.
    scrollToColumn Scrolls the grid to the specified column.
    scrollToRow Scrolls the grid to the specified row.
    setFilter Sets the filter for the specified hierarchy.
    setFlatSort Sets the flat table multi-column sorting.
    setFormat Sets a default number format or the number format for the specified measure.
    setOptions Sets the component’s options.
    setReport Sets a report to be displayed in the component.
    setSort Sets the sort type to the specified hierarchy.
    setTableSizes Sets table sizes for the component.
    shareReport Saves the current report to Flexmonster Data Server and provides a link to the saved report.
    showCharts Switches to the charts view and shows the chart of the specified type.
    showGrid Switches to the grid view.
    showGridAndCharts Switches to the grid and charts view and shows the chart of the specified type.
    sortFieldsList Sets custom sorting for Field List items.
    sortingMethod Sets custom sorting for hierarchy members.
    sortValues Sorts a specific row or column in the compact form, the classic form, and the chart view.
    updateData Updates data for the report without cleaning the report.

    List of events

    Event Description
    afterchartdraw Triggered after chart rendering.
    aftergriddraw Triggered after grid rendering.
    beforegriddraw Triggered before grid rendering.
    beforetoolbarcreated Triggered before the creation of the Toolbar.
    cellclick Triggered when a cell is clicked on the grid.
    chartclick Triggered when a chart element is clicked.
    celldoubleclick Triggered when a cell is double clicked on the grid.
    datachanged Triggered after the user edits data.
    dataerror Triggered when some error occurred during the loading of data.
    datafilecancelled Triggered when Open file dialog was opened and customer clicks Cancel button.
    dataloaded Triggered when the component loaded data.
    drillthroughclose Triggered when the drill-through view is closed.
    drillthroughopen Triggered when the drill-through view is opened.
    exportcomplete Triggered when the export is complete.
    exportstart Triggered when the export starts.
    fieldslistclose Triggered when the built-in Field List is closed.
    fieldslistopen Triggered when the built-in Field List is opened.
    filterclose Triggered when the filter pop-up window is closed.
    filteropen Triggered when the filter pop-up window is opened.
    loadingdata Triggered when data starts loading from from local or remote CSV, JSON or after report was loaded.
    loadinglocalization Triggered when localization file starts loading.
    loadingolapstructure Triggered when structure of OLAP cube starts loading.
    loadingreportfile Triggered when a report file started loading.
    localizationerror Triggered when some error appeared while loading localization file.
    localizationloaded Triggered when localization file was loaded.
    olapstructureerror Triggered when some error appeared while loading OLAP structure.
    olapstructureloaded Triggered when OLAP structure was loaded.
    openingreportfile Triggered when customer uses menu Open -> Local report or API method open() is called.
    printcomplete Triggered when the OS print manager is closed.
    printstart Triggered when the OS print manager is opened to start printing.
    querycomplete Triggered after the data query was complete.
    queryerror Triggered if some error occurred while running the query.
    ready Triggered when the component’s initial configuration completed and the component is ready to receive API calls.
    reportchange Triggered when a report is changed in the component.
    reportcomplete Triggered when the operations can be performed with the component (data source file or OLAP structure was loaded successfully and the grid/chart was rendered).
    reportfilecancelled Triggered when customer uses menu Open -> Local report and clicks Cancel button.
    reportfileerror Triggered when some error occurred during the loading of the report file.
    runningquery Triggered before data query is started.
    unauthorizederror Triggered when the Accelerator or the custom data source API server sends the 401 Unauthorized error in response to Flexmonster's request.
    update Triggered when the change occurred in the component.