;var getDpt=function(e){var dpt=0;if(e.children){e.children.forEach(function(d){var tmpDpt=getDpt(d); if(tmpDpt>dpt){dpt=tmpDpt}})}; return 1+dpt},ht=getDpt(data), divHt, divWd, firstLoad=true; function renderChart(){var svg=d3.select("#chart"), locHt=+svg.style("height").split("px")[0], locWd=+svg.style("width").split("px")[0]; if(firstLoad || divHt!=locHt || divWd!=locWd){firstLoad=false; divHt=locHt; divWd=locWd; d3.selectAll(".d3-flame-graph").remove(); d3.selectAll(".d3-flame-graph-tip").remove(); var flameGraph=d3.flameGraph().height(locHt-5).width(locWd-5).cellHeight(18).transitionDuration(750).transitionEase("cubic-in-out").sort(!0).title(""),tip=d3.tip().direction("s").offset([8,0]).attr("class","d3-flame-graph-tip").html(function(t){return"name: "+t.name+", value: "+t.value+", count: "+t.count});flameGraph.tooltip(tip),svg.datum(data).call(flameGraph)}}; function renderNextChart(){renderChart(); setTimeout(renderNextChart, 500);}; document.onreadystatechange=function(){if(document.readyState=="complete"){divHt=60+ht*20, divWd=960; d3.select("#chart").style('width', divWd+"px").style("height", divHt+"px").style("-moz-appearance", "textfield-multiline").style("-webkit-appearance", "textarea").style("overflow", "auto").style("resize", "both").style("border", "1px solid gray");renderNextChart();}};</script></body></html>