setSource (value);
value. Workbook.
The setSource method specifies the workbook to display its data in the component.
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:
//Get parameters panel in properties panel var parametersPanel = workbookBox.getPropertyBarView().getParametersPanel(); //Create an empty workbook var newWbk = new PP.TS.WbkDocument(); //Set empty workbook as a data source for parameters panel parametersPanel.setSource(newWbk); var setSourceButton = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Set data source", //Title Click: PP.Delegate(onClickSetSource) }); //button click handler function onClickSetSource() { //Set filled workbook as a data source for parameters panel parametersPanel.setSource(wbk); //Rerender parameters panel parametersPanel._render(); }
After executing the example a button named Set Source is placed in the HTML page. To execute the example, select a calculated series in the workbook, next open the Parameters panel in the Series tab of the side panel and click the Set Source button. The parameters panel will be completed.
See also: