PP.TS.isDerivedSerie

Syntax

isDerivedSerie (serie);

Parameters

serie. Sets series index.

Description

The isDerivedSerie method determines whether specified series is a child series.

Comments

This method returns True if the series passed to the method as a parameter, is a child series, otherwise the method returns False.

Example

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 getIsDerivedSerieButt = 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++)
			{
				//Get whether series is a child series
				PP.TS.isDerivedSerie(series[i]) ? addDerivedSerieString(i) : addNonDerivedSerieString(i);
			}
		function addDerivedSerieString(rowIndex)
			{
				messageString = messageString + "The series number " + i + " - is a child series" + '\n';
			}
		function addNonDerivedSerieString(rowIndex)
			{
				messageString = messageString + "The series number " + i + " -  is not a child 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 child series.

See also:

PP.TS