MetaHierarchy.FilterFacts

Syntax

FilterFacts: Array;

Description

The FilterFacts property determines array that contains keys of the series to be shown in the hierarchy.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), the time series database should also contain series with the 643251, 1234785, 643262 keys. The following code must be added in the event handler that processes document opening:

//Return service used to work with workbook series hierarchy
var hieService = tsService.getHieService();
//Returns series tree hierarchy
var hie = wbk.getHier();
var setFilterFactsButt = new PP.Ui.Button({
	ParentNode: document.body, //Parent DOM node
	Content: "Set Filter Facts", //Text      
	Click: PP.Delegate(onClickSetFilterFacts)
});
var state = false;
function onClickSetFilterFacts() {
	hie.setFilterFacts(state ? [643251, 1234785, 643262] : []); //The tree displays only series with these keys/all series
	state = !state;
	hieService.setMetadata(hie); //Send metadata to service
}

After executing the example the HTML page contains the WorkbookBox component and the Set Filter Facts button. On the button click, the tree displays only the series with the 643251, 1234785, 643262 keys, on the repeated click all series are displayed.

See also:

MetaHierarchy