Get Free Trial
API reference
Table of contents

getAllHierarchies

getAllHierarchies(): Array

[starting from version: 1.4]

Returns a list of all available hierarchies. Note that getAllHierarchies has an async equivalent – getAllHierarchiesAsync.

Returns

Array of objects. Each object in the array contains the following properties:

  • caption – String. Hierarchy caption.
  • uniqueName – String. Unique hierarchy name.
  • levels – Array. The levels of the hierarchy.
  • type – String. The hierarchy’s type. It is returned for "json", "csv", "api", and "elasticsearch" data source types:
    • For "json" and "csv", the type can be the following: "string", "number", "date", "date string", "year/month/day", "year/quarter/month/day", "datetime", "time".
    • For "api", the type can be the following: "string", "number", "date string", "datetime", "time".
    • For "elasticsearch", the type’s possible values are described here: Field data types.

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

Example

flexmonster.getAllHierarchies();

/* method returns array of objects
[
	{caption: "Business Type", uniqueName: "Business Type", type: "string"},
	{caption: "Category", uniqueName: "Category", type: "string"},
	{caption: "Country", uniqueName: "Country", type: "string"}
]
*/

Check out on JSFiddle.

See also

getAllHierarchiesAsync
getAllMeasures
getColumns
getRows
getReportFilters
getMeasures