forked from devsar/d3talk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchord-matrix.html
99 lines (95 loc) · 4.23 KB
/
chord-matrix.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link type="text/css" rel="stylesheet" href="style.css"/>
</head>
<body>
<div id="body">
<pre style="text-align:center;font-size:18px;"><code>
5 0 0 2 0 0 0 0 0 0 0 0 0 3 0 2 0 0 0 8 0 0 0 0 0 0 1 0 0 0
0 1 0 5 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 14 0 0 0 0 0 0 6 0 0 1
0 0 0 1 0 0 0 0 0 0 0 0 1 2 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1
0 0 0 30 1 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 16 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 7 17 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 2 7 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 2 0 1 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 61 0 0 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0 0 0 0 6 0 0 0 0 0 0 1 2 0 0
0 0 0 6 0 0 0 0 0 3 0 0 6 20 0 0 0 4 0 34 1 0 0 0 0 0 2 0 14 1
0 0 0 3 0 0 0 0 0 0 0 0 0 1 0 0 0 2 1 2 0 2 0 0 0 0 2 0 0 0
</code></pre>
<div id="footer">
<span>adjacency matrix</span>
<div class="hint">
each cell <i>ij</i> represents an edge from <i>i</i> to <i>j</i>
</div>
</div>
</div>
<script type="text/javascript" src="d3/d3.js"></script>
<script type="text/javascript" src="hijs/hi.js"></script>
<script type="text/javascript">
var names = [
"analytics.cluster",
"analytics.graph",
"analytics.optimization",
"animate",
"animate.interpolate",
"data.converters",
"data",
"display",
"flex",
"physics",
"query",
"query.methods",
"scale",
"util",
"util.heap",
"util.math",
"util.palette",
"vis.axis",
"vis.controls",
"vis.data",
"vis.data.render",
"vis.events",
"vis.legend",
"vis.operator.distortion",
"vis.operator.encoder",
"vis.operator.filter",
"vis.operator",
"vis.operator.label",
"vis.operator.layout",
"vis"
];
d3.selectAll("span.number")
.data(cross(names, names))
.on("mouseover", function(d) { d3.select("#footer span").text(d.x + " → " + d.y); })
.filter(function() { return !+this.textContent; })
.style("color", "#ccc");
function cross(a, b) {
var c = [], n = a.length, m = b.length, i, j;
for (i = -1; ++i < n;) for (j = -1; ++j < m;) c.push({x: a[i], i: i, y: b[j], j: j});
return c;
}
</script>
</body>
</html>