getChartCategory();
The getChartCategory method returns the Chart tool ribbon tab.
The method returns an object of the PP.TS.Ui.ChartCategory class.
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 the Ribbon component var ribbonView = workbookBox.getRibbonView(); //Get the Chart workbook toll ribbon tab
var chartCategory = ribbonView.getChartCategory(); var charCategoryButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Chart", //Text Click: PP.Delegate(onClickChartCategory) }); var state = False; function onClickChartCategory() { //Show or hide the Chart workbook tool ribbon tab state ? chartCategory.hide() : chartCategory.show(); state = !state; }
After executing the example the user gets the Chart tab on tool ribbon.
To get the Chart tab, click the Chart button under the side panel.
See also: