GroupSeries (wbk, series, callback);
wbk. Sets workbook value.
series. Sets array of indexes of the table series.
callback. Sets handler for operation execution end.
The GroupSeries method groups workbook series.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), the first and second workbook series cannot be group series, and the following code must be added in the document opening event handler:
var groupSeriesButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Group a series", //text Click: PP.Delegate(onClickGroupSeries) }); function onClickGroupSeries() { var wbk = args.Workbook; //Get series var series = wbk.getSeries(); //Select series to group var toOneGroup = [series[0], series[1]]; //Group workbook series tsService.GroupSeries(wbk, toOneGroup, PP.Delegate(onGroupSeries, this)); // GroupSeries method execution end event handler function onGroupSeries(sender, args){ //Refresh to see grouped records workbookBox.refreshAll(); } }
After executing the example a button named Group Series is placed in the HTML page. On clicking this button the first two workbook series are grouped:
See also: