/** * A chart showing the distribution of the number of WiFis per MAC and highlights the active clients bucket * Code based on http://bl.ocks.org/Caged/6476579 */ var activeClientTreeObj; // The tree chart object for the active client SSIDs chart function updateSsidChart(closestActiveClientSSIDInfo) { // Draw the tree the first time with demo data, will be updated with real information as soon as it is available var treeObj = activeClientTreeObj || d3Tree.createTree(closestActiveClientSSIDInfo, d3.select(".ssidTreeChart"), { margins: [20, 20, 20, 270], width: screenSize.width * 0.42, height: screenSize.height, }); if(!activeClientTreeObj) { activeClientTreeObj = treeObj; return; } d3Tree.update(activeClientTreeObj); activeClientTreeObj = treeObj; // Store in global var }