captionText (series, attrsIndex);
series. Array of series.
attrsIndex. Attribute index.
The captionText method returns the text to be shown in drop-down menu for the attribute with specified index.
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(); console.log(serieAttributesPanel); var captionTextButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Text name", //Title Click: PP.Delegate(onClickCaptionText) }); function onClickCaptionText() { var series = []; series.push(wbk.getSeries()[0]); console.log(series); var attrsIndex = 0; //Get text that must be output in drop-down list for attribute with specified index var text = serieAttributesPanel.captionText( series, attrsIndex ); alert("Attribute value: " + text); }
To get attribute value, click the Text Name button below the navigation panel.
See also: