-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
71 lines (63 loc) · 1.3 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: open-sans, sans;
}
.container {
width: 900px;
margin-left: auto;
margin-right: auto;
}
#chart {
padding: 10px;
width: 900px;
height: 900px;
}
.node rect {
cursor: move;
fill-opacity: .9;
shape-rendering: crispEdges;
}
.node text {
pointer-events: none;
text-shadow: 0 1px 0 #fff;
}
.link {
fill: none;
stroke: #000;
stroke-opacity: .2;
}
.link:hover, .selected {
stroke-opacity: .5;
}
</style>
<title>OpenSpending Sankey</title>
</head>
<body>
<div class="container">
<div id="chart">
</div>
<p>Fork on <a href="https://github.com/mihi-tr/openspending-sankey">Github</a></p>
<script src="js/vendor/d3.v3.min.js"></script>
<script src="js/vendor/sankey.js"></script>
<script src="js/vendor/underscore-min.js"></script>
<script src="js/vendor/jquery.js"></script>
<script src="js/vendor/openspending/aggregator.js"></script>
<script src="js/os-sankey.js"></script>
<script>
var config={
siteUrl: 'http://openspending.org',
dataset: 'boost-m-bauer',
drilldowns: ['sector','economic-category'],
cuts: ['year:2009'],
rootNodeLabel: 'Total',
measure: 'amount',
processEntry: function(e) { return e; },
callback: function (tree) {data=tree}
};
OpenSpending.sankey(config);
</script>
</body>
</html>