☝️Small business or a startup? See if you qualify for our special offer.
+
All documentation

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 FieldObjectReturned objects that describe the selected fields.

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

Example

pivot.getColumns();

/* method returns an array of FieldObjectReturned objects
[
{
"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