-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathchord-code.html
More file actions
32 lines (30 loc) · 847 Bytes
/
chord-code.html
File metadata and controls
32 lines (30 loc) · 847 Bytes
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
<!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="margin-left:80px;font-size:36px;"><code>
// converts matrix to chord and arc angles
var layout = d3.layout.chord()
.sortSubgroups(d3.descending)
.sortChords(d3.descending)
.padding(.04);
// converts chord angles to path data
var chord = d3.svg.chord()
.radius(r);
// converts arc angles to path data
var arc = d3.svg.arc()
.innerRadius(r)
.outerRadius(r + 20);
</code></pre>
<div id="footer">
layouts and shapes
<div class="hint">composable pieces for visualization</div>
</div>
</div>
<script type="text/javascript" src="hijs/hi.js"></script>
</body>
</html>