forked from mbostock's block: Radial Dendrogram
Last active
October 28, 2019 11:02
-
-
Save CBasis/6f201dccb2b83163f8c92259cb7dbd2e to your computer and use it in GitHub Desktop.
Radial Dendrogram
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 | |
border: no | |
height: 900 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 1. in line 1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id,value | |
flare | |
flare.$VTHOSTNAME | |
flare.$VTHOSTNAME.VS0 | |
flare.$VTHOSTNAME.VS0.DATA | |
flare.$VTHOSTNAME.VS0.DATA.SYSTEMDB,4096 | |
flare.$VTHOSTNAME.VS0.LOG,4096 | |
flare.$VTHOSTNAME.VS0.LOG.DB_ES1,4096 | |
flare.$VTHOSTNAME.VS0.LOG.SYSTEMDB,4096 | |
flare.VS0 | |
flare.VS0.config_files | |
flare.VS0.config_files.COUNT_0,4096 | |
flare.VS0.config_files.COUNT_0.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_0.global,5515 | |
flare.VS0.config_files.COUNT_1,4096 | |
flare.VS0.config_files.COUNT_1.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_1.global,5515 | |
flare.VS0.config_files.COUNT_2,4096 | |
flare.VS0.config_files.COUNT_2.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_2.global,5515 | |
flare.VS0.config_files.COUNT_3,4096 | |
flare.VS0.config_files.COUNT_3.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_3.global,5515 | |
flare.VS0.config_files.COUNT_4,4096 | |
flare.VS0.config_files.COUNT_4.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_4.global,5515 | |
flare.VS0.config_files.COUNT_5,4096 | |
flare.VS0.config_files.COUNT_5.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_5.global,5515 | |
flare.VS0.config_files.COUNT_6,4096 | |
flare.VS0.config_files.COUNT_6.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_6.global,5515 | |
flare.VS0.config_files.COUNT_7,4096 | |
flare.VS0.config_files.COUNT_7.dfvvesvs0hd00,5646 | |
flare.VS0.config_files.COUNT_7.global,5515 | |
flare.VS0.config_files.COUNT_9,4096 | |
flare.VS0.config_files.COUNT_9.dfvvesvs0hd00,5329 | |
flare.VS0.config_files.COUNT_9.global,5515 | |
flare.VS0.config_files.Fri | |
flare.VS0.config_files.Fri.dfvvesvs0hd00,5329 | |
flare.VS0.config_files.Fri.global,5515 | |
flare.VS0.config_files.Tue | |
flare.VS0.config_files.Tue.dfvvesvs0hd00,5329 | |
flare.VS0.config_files.Tue.global,5515 | |
flare.VS0.data | |
flare.VS0.data.DB_EN0,4096 | |
flare.VS0.data.DB_ES0,934097145856 | |
flare.VS0.data.DB_ES1,113590620160 | |
flare.VS0.data.DB_ES1.DB_ES1,4096 | |
flare.VS0.data.SYSTEMDB,66648190976 | |
flare.VS0.log | |
flare.VS0.log.DB_ES0,127421808640 | |
flare.VS0.log.DB_ES0,127421808640 | |
flare.VS0.log.DB_ES1,41320476672 | |
flare.VS0.log.DB_ES1,41320476672 | |
flare.VS0.log.SYSTEMDB,29750636544 | |
flare.VS0.log.SYSTEMDB.newer,94208 | |
flare.VS0.log.SYSTEMDB.newer,94208 | |
flare.WS0 | |
flare.WS0.config_files,4096 | |
flare.WS0.data | |
flare.WS0.data.DB_FN0,4096 | |
flare.WS0.data.DB_FS0,49291956224 | |
flare.WS0.data.DB_FS1,14395346944 | |
flare.WS0.data.DB_WS0,4096 | |
flare.WS0.data.SYSTEMDB,5369049088 | |
flare.WS0.log | |
flare.WS0.log.DB_FS0,399214690304 | |
flare.WS0.log.DB_FS1,292114722816 | |
flare.WS0.log.SYSTEMDB,1052390526976 | |
flare.XS0 | |
flare.XS0.config_files,4096 | |
flare.XS0.data | |
flare.XS0.data.DB_KN0,19059085312 | |
flare.XS0.data.DB_KS0,36457058304 | |
flare.XS0.data.DB_KS1,6056742912 | |
flare.XS0.data.SYSTEMDB,6157410304 | |
flare.XS0.log | |
flare.XS0.log.DB_KN0,22690299904 | |
flare.XS0.log.DB_KS0,26873028608 | |
flare.XS0.log.DB_KS1,17937993728 | |
flare.XS0.log.SYSTEMDB,32914739200 | |
flare.ZS0 | |
flare.ZS0.config_files,4096 | |
flare.ZS0.data | |
flare.ZS0.data.DB_PS0,51271340032 | |
flare.ZS0.data.DB_PS1,6392287232 | |
flare.ZS0.data.DB_ZS0,4096 | |
flare.ZS0.data.SYSTEMDB,6241296384 | |
flare.ZS0.log | |
flare.ZS0.log.DB_PS0,655249408 | |
flare.ZS0.log.DB_PS1,834719744 | |
flare.ZS0.log.SYSTEMDB,667246592 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.node circle { | |
fill: #999; | |
} | |
.node text { | |
font: 10px sans-serif; | |
} | |
.node--internal circle { | |
fill: #555; | |
} | |
.node--internal text { | |
text-shadow: 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff; | |
} | |
.link { | |
fill: none; | |
stroke: #555; | |
stroke-opacity: 0.4; | |
stroke-width: 1.5px; | |
} | |
</style> | |
<svg width="960" height="900"></svg> | |
<script src="//d3js.org/d3.v4.min.js"></script> | |
<script> | |
var svg = d3.select("svg"), | |
width = +svg.attr("width"), | |
height = +svg.attr("height"), | |
g = svg.append("g").attr("transform", "translate(" + width / 2 + "," + (height / 2 + 20) + ")"); | |
var stratify = d3.stratify() | |
.parentId(function(d) { return d.id.substring(0, d.id.lastIndexOf(".")); }); | |
var cluster = d3.cluster() | |
.size([360, width / 2 - 120]); | |
d3.csv("flare.csv", function(error, data) { | |
if (error) throw error; | |
var root = stratify(data) | |
.sort(function(a, b) { return a.height - b.height || a.id.localeCompare(b.id); }); | |
cluster(root); | |
var link = g.selectAll(".link") | |
.data(root.descendants().slice(1)) | |
.enter().append("path") | |
.attr("class", "link") | |
.attr("d", function(d) { | |
return "M" + project(d.x, d.y) | |
+ "C" + project(d.x, (d.y + d.parent.y) / 2) | |
+ " " + project(d.parent.x, (d.y + d.parent.y) / 2) | |
+ " " + project(d.parent.x, d.parent.y); | |
}); | |
var node = g.selectAll(".node") | |
.data(root.descendants()) | |
.enter().append("g") | |
.attr("class", function(d) { return "node" + (d.children ? " node--internal" : " node--leaf"); }) | |
.attr("transform", function(d) { return "translate(" + project(d.x, d.y) + ")"; }); | |
node.append("circle") | |
.attr("r", 2.5); | |
node.append("text") | |
.attr("dy", "0.31em") | |
.attr("x", function(d) { return d.x < 180 === !d.children ? 6 : -6; }) | |
.style("text-anchor", function(d) { return d.x < 180 === !d.children ? "start" : "end"; }) | |
.attr("transform", function(d) { return "rotate(" + (d.x < 180 ? d.x - 90 : d.x + 90) + ")"; }) | |
.text(function(d) { return d.id.substring(d.id.lastIndexOf(".") + 1); }); | |
}); | |
function project(x, y) { | |
var angle = (x - 90) / 180 * Math.PI, radius = y; | |
return [radius * Math.cos(angle), radius * Math.sin(angle)]; | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
�PNG | |