Example of BubbleTreeMaster and BubbleTree Components Layout

To execute this example, create an HTML page and perform the following operations:

1. In the HEAD tag add links to the following CSS files: PP.css, PP.Metabase.css, PP.Express.css.

Also add links to the following JS files: PP.js, PP.GraphicsBase.js, PP.Metabase.js, PP.BubbleTree.js, PP.TreeChartMaster.js, resources.ru.js and BubbleTreeData.js.

Contents of the BubbleTreeData.js file

2. In the SCRIPT tag add a code to create the BubbleTreeMaster and BubbleTree components:

<script language="javascript">
    // Variable which will store chart instance
    var bubbleTree;
    // Variable which will store wizard instance
    var bubbleTreeMaster;
    // Specify path to root folder with resources files
    PP.resourceManager.setRootResourcesFolder("build/resources/");
    // Determines language settings for resources
    PP.setCurrentCulture(PP.Cultures.ru)
    // Get DOM element of container that will display bubble tree
    var container = document.getElementById("bubbleTree");
    // Create a new chart instance
    bubbleTree = new PP.Ui.BubbleTree(data);
    // Place chart in the <div> block
    bubbleTree.addToNode(container);
    // Set chart sizes
    bubbleTree.setWidth(480);
    bubbleTree.setHeight(480);
    //create a chart wizard
    bubbleTreeMaster = new PP.Ui.BubbleTreeMaster({            
        ParentNode: "master", //DOM node that will contain wizard
                    Height: 500,
                    Width: 300,
                    ImagePath: "build/img/",
                    DataView: bubbleTree        
    });
</script>

3. In the BODY tag place the created components:

<table style="width: 500px; border: #CCCCCC 1px solid">
    <tr>
        <td valign="top" width="250" id="master"></td>
        <td valign="top" id="bubbleTree"></td>
    </tr>
</table>

After executing the example the page will contain a bubble tree and a wizard for its setup:

Seealso:

BubbleTreeMaster | BubbleTree