FilterFacts: Array;
The FilterFacts property determines array that contains keys of the series to be shown in the hierarchy.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and the time series database must include series with the keys 643251, 1234785, 643262. The following code must be added in the event handler that processes document opening:
//Return a service used to work with workbook series hierarchy var hieService = tsService.getHieService(); //Return series tree hierarchy var hie = wbk.getHier(); var setFilterFactsButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Set Filter Facts", //Text Click: PP.Delegate(onClickSetFilterFacts) }); var state = False; function onClickSetFilterFacts() { hie.setFilterFacts(state ? [643251, 1234785, 643262] : []); //The tree displays the series with these keys only/all series state = !state; hieService.setMetadata(hie); //Send metadata to service }
After executing the example the WorkbookBox component and a button named Set Filter Facts are placed in the HTML page. On clicking this button the tree will show only series with the keys 643251, 1234785, 643262, or all series if the button is clicked for the second time.
See also: