WbkToolBarView.getChartButton

Syntax

getChartButton();

Description

The getChartButton method returns the Chart button of the WbkToolBar component.

Comments

The method returns an object of the PP.Ui.ToolBarButton type.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Deactivate buttons of the Chart, Map and Table views, and refresh toolbar that manages views visibility:

// Get toolbar for controlling visibility of workbook views
var toolBarView = workbookBox.getDataView().getToolBarView();
// Get the Chart button
var chartButton = toolBarView.getChartButton();
// Disable the button
chartButton.setEnabled(False);
// Get the Map button
var mapButton = toolBarView.getMapButton();
// Disable the button
mapButton.setEnabled(False);
// Get the Table button
var gridButton = toolBarView.getGridButton();
// Disable the button
gridButton.setEnabled(False);
// Refresh the component
toolBarView.refreshAll();

After executing the example buttons of the Chart, Map and Table views become inactive, and the toolbar that manages views visibility is refreshed:

See also:

WbkToolBarView