clearAttrs ();
The clearAttrs method removes a list of 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:
//Get panel for editing selected series attribute values var serieAttributesPanel = workbookBox.getPropertyBarView().getSerieAttributesPanel(); var clearAttrsButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Clear Attrs", //Title Click: PP.Delegate(onClickClearAttrs) }); function onClickClearAttrs() { //Output number of properties in the list of series before clearing alert(attrCount()); //Clear list of series serieAttributesPanel.clearAttrs(); //Output number of properties in the list of series after clearing alert(attrCount()); } function attrCount(){ var controls = serieAttributesPanel._Controls; var controlsCount = null; for (var key in controls){ controlsCount++; } return controlsCount; }
After executing the example the number of selected and removes series of time series attributes tree is shown in the screen.
See also: