isCalculatedSerie (serie);
serie. Sets series index.
The isCalculatedSerie method determines whether specified series is a calculated series.
This method returns True if the series passed to the method as a parameter, is a calculated series, otherwise the method returns False.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and the following code must be added in the document opening event handler:
var getIsCalculatedSerieButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Get Series Type", //Text Click: PP.Delegate(onClickType) }); function onClickType() { var series = wbk.getSeries(); var messageString = ""; for (var i = 0; i<series.length; i++) { //determine whether the specified series is a calculated one PP.TS.isCalculatedSerie(series[i]) ? addCalculatedSerieString(i) : addNonCalculatedSerieString(i); } function addCalculatedSerieString(rowIndex) { messageString = messageString + "The series number " + i + " - is a calculated series" + '\n'; } function addNonCalculatedSerieString(rowIndex) { messageString = messageString + "The series number " + i + " - is not a calculated series" + '\n'; } alert(messageString); }
After executing the example the button named Get Series Type is placed in HTML page. Clicking this button shows a message on whether the series available in the table are calculated series.
See also: