Master.removePanelsByGroup

Syntax

removePanelsByGroup(groupName);

Parameters

groupName. Name of the group being removed.

Description

The removePanelsByGroup method removes panels by name of the group, to which they belong.

Example

To execute the example the HTML page must contain links to following files:

In the <body> tag of the HTML document it is necessary to put the table for chart and master:

<body onselectstart="return false" class="PPNoSelect" onload="onReady()">
    <table style="width: 100%">
        <tr>
            <td valign="top" width="350" id="chartM">
            </td>
            <td valign="top" id="tdChart">
            </td>
        </tr>
    </table>
</body>

Code of the example must be placed in the <script> tag. Create and display chart and master to setup it:

// Create a chart
chart = new Highcharts.Chart(options);
// Create a chart master
master = new PP.Ui.ChartMaster({
    // Set parent item
    ParentNode: "chartM",
    // Set chart
    Chart: chart,
    // Set sizes
    Height: 500,
    Width: 300,
    // Set path to the folderwith icons
    ImagePath: "../build/img/" //path to the folder with images
});

As a result the chart and setup master are displayed:

Get active panel of the master and remove it:

// Get active panel of the master
var panel = master.getActivePanel();
// Remove the panel
master.removeMasterPanel(panel);

As a result, the panel named Chart is removed from the master:

Insert removed panel in the master, after all panels:

// Add removed panel in the master
master.addMasterPanel(panel);

As a result removed panel is added to the master:

Change the name of the group named Chart and remove all other panels which are in the Chart group:

// Change panel group
panel.setGroupName("NewChart");
// Remove all other panels
panel.removePanelsByGroup("Chart");

As a result master contains only one panel named Chart:

See also:

Master