TrendWizardView.CurrentState

Syntax

CurrentState: Object;

Description

The CurrentState property determines current state of trend parameters.

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 getCurrentStateButt = new PP.Ui.Button({
	ParentNode: document.body, //DOM parent node
	Content: "Get Current State", //Title      
	Click: PP.Delegate(onClickGetCurrentState)     
}); 
function onClickGetCurrentState()
	{
		//Get panel that must contain trend parameters wizard panel
		var parametersPanel = workbookBox.getPropertyBarView().getParametersPanel();
		//Get trend parameters wizard panel
		var trendWizard = parametersPanel._TrendWizard;
		//Get CurrentState of trend parameters wizard panel
		var state = trendWizard.getCurrentState();
		alert(JSON.stringify(state));
		//Get method type
		var methodType = trendWizard.getMethodType()
		alert('Method type: ' + methodType);
	}

After executing the example the Get Current State button is placed in HTML page. Click the Forecasting button in the Calculations ribbon tab, select the Geometric Trend item in drop-down menu, open the Parameters panel in the Series tab of side panel, and click the Get Current State button. After that the screen shows a message that contains type of calculation method for selected series and JSON object that contains the current trend parameters.

See also:

TrendWizardView