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

    getMeasures(): Array

    [starting from version: 1.4]

    Returns a list of the selected measures in the report. Note that getMeasures has an async equivalent - getMeasuresAsync.

    Returns

    Array of ResultMeasureObjects that describe the selected measures.

    If data load is in progress an empty array will be returned.

    Example

    flexmonster.getMeasures(); 
    
    /* method returns and array of ResultMeasureObjects
    [
      {
        aggregation: "sum",
        availableAggregations: ["sum", "average", "percent"],
        availableAggregationsCaptions: ["Sum", "Count", "Percent"],
        caption: "Sum of Sales",
        format: "currency",
        grandTotalCaption: "Total Sum of Sales",
        name: "Sales",
        type: "number",
        uniqueName: "Sales"
      },
      {
        aggregation: "sum",
        availableAggregations: ["sum", "count", "distinctcount", "average", "product", "min", "max", "percent", "percentofcolumn", "percentofrow", "index"],
        availableAggregationsCaptions: ["Sum", "Count", "Distinct Count", "Average", "Product", "Min", "Max", "% of Grand Total", "% of Column", "% of Row", "Index"],
        caption: "Sum of Orders",
        format: "",
        grandTotalCaption: "Total Sum of Orders",
        name: "Orders",
        type: "number",
        uniqueName: "Orders"
      }
    ]
    */ 

    Try on JSFiddle.

    See also

    getMeasuresAsync
    getAllMeasures
    getAllHierarchies
    getColumns
    getRows
    getReportFilters