All documentation
  • API Reference for older versions
  • getColumns

    getColumns(): Array

    [starting from version: 1.4]

    Returns a list of fields selected in the report slice for columns. Note that getColumns has an async equivalent - getColumnsAsync.

    Returns

    Array of ResultHierarchyObjects that describe the selected fields.

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

    Example

    pivot.getColumns();

    /* method returns an array of ResultHierarchyObjects
    [
    {
    "caption": "Color",
    "dimensionCaption": "Color",
    "dimensionUniqueName": "Color",
    "folder": "",
    "label": "Color",
    "sort": "asc",
    "uniqueName": "Color",
    "type": "string"
    },
    // Other fields
    ]
    */

    Check out on JSFiddle.

    See also

    getColumnsAsync
    getAllHierarchies
    getRows
    getReportFilters
    getAllMeasures
    getMeasures