copySeries (wbk, series, callback);
wbk. Sets the workbook.
series. Sets an array of series.
callback. Sets handler for operation execution end.
The copySeries method copies series.
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 copySerieButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Copy series", //Text Click: PP.Delegate(onClickCopySerie) }); function onClickCopySerie() { var source = workbookBox.getSource();//Return an instance of the PP.TS.WbkDocument class //Get the first series var serie = source.getSeries()[0]; //Copy the first series tsService.copySeries(source, serie, function () { //Refresh the workbookBox component workbookBox.refreshAll(); }); }
After executing the example the WorkbookBox component and the Copy Series button are placed on the HTML page. On clicking the button the first series in the workbook is copied.
See also: