ExponentialSmoothingWizardView.getAutoFitPanelEnabled

Syntax

getAutoFitPanelEnabled ();

Description

The getAutoFitPanelEnabled method indicates if autocomplete panel is available.

Comments

If it is set to True autocomplete panel is available, otherwise it is not.

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 getAutoFitPanelEnabledButt = new PP.Ui.Button({
	ParentNode: document.body, //DOM parent node
	Content: "Is autofit panel available?", //Text
	Click: PP.Delegate(onClickGetAutoFitPanelEnabled)
});  
function onClickGetAutoFitPanelEnabled()
	{
		//Get the panel, which must contain setup wizard of calculation parameters for the ModelToolbar component - equation
		var parametersPanel = workbookBox.getPropertyBarView().getParametersPanel();
		var exponentialSmoothingWizard = parametersPanel._ExponentialSmoothingWizard;
		//Parameter setup panel for the ModelToolbar component - equation is available if the formula type of the selected series is 
		//"Exponential Smoothing". 
		if (!exponentialSmoothingWizard || !exponentialSmoothingWizard.getIsVisible()) 
			{
				return alert('Calculation parameter setup wizard for the ModelToolbar component - equation cannot be applied to the selected series. \n Select another series);
			}
		//Get information about autofill panel availability
		var panelEnabled = exponentialSmoothingWizard.getAutoFitPanelEnabled();
		var panelEnabledSrt = "Autofill panel is available"; 
		var panelNotEnabledStr = "Autofill panel is not available";
		//Output message about autofill panel availability
		panelEnabled ? alert(panelEnabledSrt) : alert(panelNotEnabledStr);
	}

After executing the example a WorkbookBox component and a button named Is Autocomplete Panel Available are placed in the HTML page. In the Calculations ribbon tab click the Forecasting button. Select Exponential Smoothing in drop-down menu, open the Parameters panel in the Series tab on side panel, select any parameter and click the Is Autocomplete Panel Available button. After that a message informing if autocomplete panel is available appears in the screen.

See also:

ExponentialSmoothingWizardView