getStatPanelVisible ();
The getStatPanelVisible method indicates if statistics panel is visible.
If this method is set to True, the statistics panel is visible, when the method is False, it is hidden.
To execute the example, the page must contain the WbkDataBox component named wbkDataBox (see WbkDataBox Constructor), and also the following code must be added in the event handler that processes document opening:
// Create a checkbox used to show working of the getStatPanelVisible() method cbIsStatPanelVisible = new PP.Ui.CheckBox({ ParentNode: "params", //DOM parent node Content: "Show/Hide Statistics Panel", //text Checked: True //checkbox is selected }); // Link handler to the event of the Show/Hide Statistics Panel checkbox state change cbIsStatPanelVisible.CheckedChanged.add(function (sender, args) { // Get checkbox value var checked = sender.getChecked(); console.log("Set statistics panel visibility"); if (checked == True) wbkDataBox._TabStatPanel.expand(); else wbkDataBox._TabStatPanel.collapse(); var isStPanVisible = wbkDataBox.getStatPanelVisible(); console.log("Statistics panel is visible: " + isStPanVisible); });
After executing the example on clicking the Show/Hide Statistics Panel checkbox the statistics panel hides or appears depending on the checkbox state, and the browser console displays True if the statistics panel is expanded or False if it is hidden.
See also: