Need a special offer?Find out if your project fits.
All documentation
  • 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>
      let pivot = new Flexmonster({
        container: "pivotContainer",
        componentFolder: "node_modules/flexmonster/",
        toolbar: true

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

    List of objects

    ReportObjectContains all the possible aspects of pivot tables and pivot charts configuration.
    DataSourceObjectContains information about the data source.
    FormatObjectDefines the way how numeric values are formatted in the component.
    ConditionalFormatObjectDescribes conditional formatting rules.
    MappingObjectContains information about field data types, captions, multi-level hierarchies, and other view configurations of the data source.
    SliceObjectDefines what data subset from the data source is going to be shown in the report.
    FilterObjectContains filtering information.
    OptionsObjectUsed to specify appearance and functionality available for customers.
    TableSizesObjectContains information about table sizes.
    MeasureIdentifierObjectAn auxiliary object that is used to identify measures when using different functionality.
    GlobalObjectUsed to set options that will be applied to all reports.
    CellDataObjectContains information about the cell.
    ChartDataObjectContains information about the chart segment.
    ChartLegendDataObjectContains information about the chart legend element.
    ToolbarObjectContains information about the Toolbar.
    ShareReportConnectionObjectContains the configuration needed to share a report.
    FieldListItemObjectContains information about the Field List item.
    ResultHierarchyObjectAn auxiliary object that is used to describe fields selected in the report.
    ResultMeasureObjectAn auxiliary object that is used to describe measures available in the report.

    List of API calls

    API callDescription
    addCalculatedMeasureAdds calculated measure.
    addConditionAdds a conditional formatting rule.
    alertShows an alert pop-up window with a custom message.
    clearClears the component’s data and view.
    clearFilterClears the filter applied previously to the specified hierarchy.
    clearXMLACacheRequests Microsoft Analysis Services to clear the cache.
    closeFieldsListCloses the Field List.
    collapseAllDataCollapses all nodes and drills up all levels of all hierarchies.
    collapseCellCollapses a specific node on the grid and charts.
    collapseDataCollapses all nodes of the specified hierarchy.
    connectToConnects to the data source and clears the current report.
    customizeAPIRequestAllows customizing the request before it is sent to a server.
    customizeCellAllows customizing of separate cells.
    customizeChartElementAllows customizing separate chart elements in Flexmonster Charts.
    customizeContextMenuAllows customizing context menu.
    disposePrepares the pivot table instance to be deleted with the browser’s garbage collection.
    drillDownCellDrills down a specific hierarchy level on the grid and charts.
    drillUpCellDrills up a specific hierarchy level on the grid and charts.
    expandAllDataExpands all nodes and drills down all levels of all hierarchies.
    expandCellExpands a specific node on the grid and charts.
    expandDataExpands all nodes of the specified hierarchy.
    exportToExports the current view to Excel, PDF, CSV, HTML, or image format.
    getAllConditionsReturns a list of conditional formatting rules of the report.
    getAllHierarchiesReturns a list of all available hierarchies.
    getAllHierarchiesAsyncThe async equivalent of getAllHierarchies.
    getAllMeasuresReturns a list of all available measures.
    getAllMeasuresAsyncThe async equivalent of getAllMeasures.
    getCellReturns information about cell by row and column indexes.
    getColumnsReturns a list of hierarchies selected in the report slice for columns.
    getColumnsAsyncThe async equivalent of getColumns.
    getConditionReturns a conditional formatting rule by id.
    getFilterReturns the filtered members for the specified hierarchy.
    getFlatSortReturns an array of objects defining the sorting on the flat grid.
    getFormatReturns the FormatObject of a default number format or the number format for the specified measure.
    getMeasuresReturns a list of the selected measures in the report.
    getMeasuresAsyncThe async equivalent of getMeasures.
    getMembersReturns a list of members for the specified hierarchy.
    getMembersAsyncThe async equivalent of getMembers.
    getOptionsReturns the OptionsObject with component’s options.
    getReportFiltersReturns a list of hierarchies selected in the report slice for Report Filters.
    getReportFiltersAsyncThe async equivalent of getReportFilters.
    getReportReturns the ReportObject which describes the current report.
    getRowsReturns a list of hierarchies selected in the report slice for rows.
    getRowsAsyncThe async equivalent of getRows.
    getSelectedCellReturns information about selected cell.
    getSortReturns the sort type which is applied to the hierarchy.
    getTableSizesReturns table sizes that are set for the component.
    getXMLACatalogsObtains a list of all available catalogs on a given data source.
    getXMLACatalogsAsyncThe async equivalent of getXMLACatalogs.
    getXMLACubesObtains a list of all available cubes on a given data source.
    getXMLACubesAsyncThe async equivalent of getXMLACubes.
    getXMLADataSourcesObtains a list of all data sources by given URL for XMLA connect.
    getXMLADataSourcesAsyncThe async equivalent of getXMLADataSources.
    getXMLAProviderNameReturns dataSourceType for given proxyUrl.
    getXMLAProviderNameAsyncThe async equivalent of getXMLAProviderName.
    loadLoads report JSON file from the specified URL.
    offRemoves JS handlers for specified event.
    onSets a JS function for the specified event.
    openOpens local report file.
    openCalculatedValueEditorOpens the calculated value pop-up window editor.
    openFieldsListOpens the Field List.
    openFilterOpens the filter pop-up window for the specified hierarchy.
    printPrints the current view via the OS print manager.
    refreshRedraws the component.
    removeAllCalculatedMeasuresRemoves all calculated measures.
    removeAllConditionsRemoves all conditional formatting rules.
    removeCalculatedMeasureRemoves the calculated measure by measure unique name.
    removeConditionRemoves the conditional formatting rule by id.
    removeSelectionRemoves a selection from cells on the grid.
    runQueryRuns a query with specified rows, columns, measures and report filters from the SliceObject and displays the result data.
    saveSaves your current report to a specified location.
    scrollToColumnScrolls the grid to the specified column.
    scrollToRowScrolls the grid to the specified row.
    setFilterSets the filter for the specified hierarchy.
    setFlatSortSets the flat table multi-column sorting.
    setFormatSets a default number format or the number format for the specified measure.
    setOptionsSets the component’s options.
    setReportSets a report to be displayed in the component.
    setSortSets the sort type to the specified hierarchy.
    setTableSizesSets table sizes for the component.
    shareReportSaves the current report to Flexmonster Data Server and provides a link to the saved report.
    showChartsSwitches to the charts view and shows the chart of the specified type.
    showGridSwitches to the grid view.
    showGridAndChartsSwitches to the grid and charts view and shows the chart of the specified type.
    sortFieldsListSets custom sorting for Field List items.
    sortingMethodSets custom sorting for hierarchy members.
    sortValuesSorts a specific row or column in the compact form, the classic form, and the chart view.
    updateDataUpdates data for the report without cleaning the report.

    List of events

    afterchartdrawTriggered after chart rendering.
    aftergriddrawTriggered after grid rendering.
    beforegriddrawTriggered before grid rendering.
    beforetoolbarcreatedTriggered before the creation of the Toolbar.
    cellclickTriggered when a cell is clicked on the grid.
    chartclickTriggered when a chart element is clicked.
    celldoubleclickTriggered when a cell is double clicked on the grid.
    datachangedTriggered after the user edits data.
    dataerrorTriggered when some error occurred during the loading of data.
    datafilecancelledTriggered when Open file dialog was opened and customer clicks Cancel button.
    dataloadedTriggered when the component loaded data.
    drillthroughcloseTriggered when the drill-through view is closed.
    drillthroughopenTriggered when the drill-through view is opened.
    exportcompleteTriggered when the export is complete.
    exportstartTriggered when the export starts.
    fieldslistcloseTriggered when the built-in Field List is closed.
    fieldslistopenTriggered when the built-in Field List is opened.
    filtercloseTriggered when the filter pop-up window is closed.
    filteropenTriggered when the filter pop-up window is opened.
    loadingdataTriggered when data starts loading from from local or remote CSV, JSON or after report was loaded.
    loadinglocalizationTriggered when localization file starts loading.
    loadingolapstructureTriggered when structure of OLAP cube starts loading.
    loadingreportfileTriggered when a report file started loading.
    localizationerrorTriggered when some error appeared while loading localization file.
    localizationloadedTriggered when localization file was loaded.
    olapstructureerrorTriggered when some error appeared while loading OLAP structure.
    olapstructureloadedTriggered when OLAP structure was loaded.
    openingreportfileTriggered when customer uses menu Open -> Local report or API method open() is called.
    printcompleteTriggered when the OS print manager is closed.
    printstartTriggered when the OS print manager is opened to start printing.
    querycompleteTriggered after the data query was complete.
    queryerrorTriggered if some error occurred while running the query.
    readyTriggered when the component’s initial configuration completed and the component is ready to receive API calls.
    reportchangeTriggered when a report is changed in the component.
    reportcompleteTriggered when the operations can be performed with the component (data source file or OLAP structure was loaded successfully and the grid/chart was rendered).
    reportfilecancelledTriggered when customer uses menu Open -> Local report and clicks Cancel button.
    reportfileerrorTriggered when some error occurred during the loading of the report file.
    runningqueryTriggered before data query is started.
    unauthorizederrorTriggered when the Accelerator or the custom data source API server sends the 401 Unauthorized error in response to Flexmonster's request.
    updateTriggered when the change occurred in the component.