setSort (metaAttrId, isActive, desc, dimAttrId);
metaAttrId. Metaattribute identifier.
isActive. Determines whether to enable sorting: if this parameter is True sorting is enabled, if it is False sorting is disabled.
desc. Sorting: True - descending sorting, False - ascending sorting, null - default.
dimAttrId. Identifier of dimension attribute, by value of which the data is to be sorted.
The setSort method sets sorting in the series tree.
To execute the example, create a service for working with time series, get a workbook instance from the time series database (see MetaHierarchy.ChildEls) and add the following code in the handler that processes document opening:
console.log("Set sorting in series tree"); hie.setSort("DL", True, True, 1);
After executing the example sorting is set for the series tree in browser console.
See also: