jQWidgets jqxTreeMap bindingComplete Event
jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxTreeMap is used for showing the hierarchical data set of nested rectangles. Here, each and every branch of the tree is represented as a rectangle, which is then tiled with smaller rectangles that represent sub-branches. Here the rectangle of the leaf node has an area proportional to a specified dimension on the data.
The bindingComplete event is activated as soon as the data binding process of the displayed jqxTreeMap ends.
Syntax:
$('Selector').on("bindingComplete", function (event) { // Code });
Linked Files: Download jQWidgets from the given link. In the HTML file, locate the script files in the downloaded folder.
<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxtooltip.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxtreemap.js”></script>
<script type=”text/javascript” src=”scripts/jqx-all.js”></script>
Example 1: The below example illustrates the jQWidgets jqxTreeMap bindingComplete Event.
HTML
<!DOCTYPE html> < html lang = "en" > < head > < link rel = "stylesheet" href = "jqwidgets/styles/jqx.base.css" type = "text/css" /> < script type = "text/javascript" src = "scripts/jquery.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxcore.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxtooltip.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxtreemap.js" > </ script > < script type = "text/javascript" src = "scripts/jqx-all.js" > </ script > </ head > < body > < center > < h1 style = "color: green;" > GeeksforGeeks </ h1 > < h3 > jQWidgets jqxTreeMap bindingComplete Event </ h3 > < div id = "Tree_Map" ></ div > < br > < div id = "log" ></ div > < script type = "text/javascript" > $(document).ready(function () { var Data_of_TreeMap = [{ label: 'GeeksforGeeks', value: 70, color: '#ff0300' }, { label: 'is a', value: 10, parent: 'GeeksforGeeks', color: '#ff5400' }, { label: 'Computer Science', value: 30, parent: 'GeeksforGeeks', color: '#008000' }, { label: 'Portal.', value: 15, parent: 'GeeksforGeeks', color: '#7fbf00' } ]; $("#Tree_Map").on("bindingComplete", function (event) { $('#log').text("Binding is done!"); }); $('#Tree_Map').jqxTreeMap({ width: 390, height: 200, source: Data_of_TreeMap }); }); </ script > </ center > </ body > </ html > |
Output:

Example 2: The following is another example of jQWidgets jqxTreeMap bindingComplete Event.
HTML
<!DOCTYPE html> < html lang = "en" > < head > < link rel = "stylesheet" href = "jqwidgets/styles/jqx.base.css" type = "text/css" /> < script type = "text/javascript" src = "scripts/jquery.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxcore.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxtooltip.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxtreemap.js" > </ script > < script type = "text/javascript" src = "scripts/jqx-all.js" > </ script > </ head > < body > < center > < h1 style = "color: green;" > GeeksforGeeks </ h1 > < h3 > jQWidgets jqxTreeMap bindingComplete Event </ h3 > < div id = "Tree_Map" ></ div > < br > < div id = "log" ></ div > < script type = "text/javascript" > $(document).ready(function () { var Data_of_TreeMap = [{ label: 'GeeksforGeeks', value: 70, color: '#ff0300' }, { label: 'is a', value: 10, parent: 'GeeksforGeeks', color: '#ff5400' }, { label: 'Computer Science', value: 30, parent: 'GeeksforGeeks', color: '#008000' }, { label: 'Portal.', value: 15, parent: 'GeeksforGeeks', color: '#7fbf00' } ]; $("#Tree_Map").on("bindingComplete", function (event) { var args = event.args; if (args === null) { $('#log').text("Null!"); } else { $('#log').text("Linking process ends!"); } }); $('#Tree_Map').jqxTreeMap({ width: 390, height: 200, source: Data_of_TreeMap }); }); </ script > </ center > </ body > </ html > |
Output:
.gif)
Please Login to comment...