TSService.addWbkSeriesByFactorKeys

Syntax

addWbkSeriesByFactorKeys (wbk, hieOdId, factorKeys, factorNames, callback);

Parameters

wbk. Sets workbook value.

hieOdId. Sets moniker of series hierarchy.

factorKeys. Sets factor keys array.

factorNames. Sets series names array.

callback. Sets handler for operation execution end.

Description

The addWbkSeriesByFactorKeys method adds series to workbook by factor keys.

Example

To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and also add the following code in the handler, that processes document opening event:

	var source = workbookBox.getSource();//Return an instance of the PP.TS.WbkDocument class
	var hieOdId = "";	
	var factorKeys = [1];
	var factorNames = ['Name'];				
	//Add series to workbook by factor keys			
	tsService.addWbkSeriesByFactorKeys(wbk, hieOdId, factorKeys, factorNames, PP.Delegate(onFactorKeys, this));			
	//addWbkSeriesByFactorKeys method execution end event handler
	function onFactorKeys(sender, args){					
		//Refresh the workbookBox component
		workbookBox.refreshAll();
	}

After executing the example a new series named Name is added to workbook table:

See also:

TSService