forked from orezeni/orezeni.github.com
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbubbletree.html
More file actions
102 lines (91 loc) · 3.43 KB
/
bubbletree.html
File metadata and controls
102 lines (91 loc) · 3.43 KB
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
100
---
layout: default
title: 使途別予算額
---
<!-- AddToAny BEGIN -->
<a class="a2a_dd" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fkoganei.spending.jp%2F&linkname=Koganei%20Spending"><img src="http://static.addtoany.com/buttons/share_save_171_16.png" width="171" height="16" border="0" alt="Share"/></a>
<script type="text/javascript">
var a2a_config = a2a_config || {};
a2a_config.linkname = "Koganei Spending";
a2a_config.linkurl = "http://koganei.spending.jp/";
a2a_config.onclick = 1;
a2a_config.locale = "ja";
a2a_config.prioritize = ["email", "facebook", "tumblr", "twitter", "linkedin", "google_plus"];
</script>
<script type="text/javascript" src="//static.addtoany.com/menu/page.js"></script>
<!-- AddToAny END -->
<div class="row">
<script type="text/javascript">
yepnope.errorTimeout = 1000;
yepnope({
load: [
'/js/libs/jquery.qtip.min.js',
'/js/libs/jquery.history.js',
'/js/libs/raphael-min.js',
'/js/libs/vis4.js',
'/js/libs/base64.js',
'/js/libs/Tween.js',
'/js/bubbletree.js',
'/css/bubbletree.css',
'/css/cra-map.css',
'/js/aggregator.js',
'/js/setting.js'
],
complete: function() {
$(function() {
var $tooltip = $('<div class="tooltip">Tooltip</div>');
$('.bubbletree').append($tooltip);
$tooltip.hide();
var dataLoaded = function(data) {
window.bubbleTree = new BubbleTree({
data: data,
container: '#bubbletree',
bubbleType: 'icon',
bubbleStyles: {
'cofog': OpenSpending.Styles.Cofog,
},
clearColors: true, // remove all colors coming from OpenSpending API
rootPath: '/',
tooltip: {
qtip: true,
delay: 800,
content: function(node) {
return [node.label, '<div class="desc">'+(node.description ? node.description : 'No description given')+'</div><div class="amount">\u00A5 '+node.famount+'</div>'];
}
}
});
};
// call openspending api for data
new OpenSpending.Aggregator({
apiUrl: 'http://openspending.org/api',
//Use static file instead of api
//localApiCache: 'aggregate.json',
dataset: OpenSpending.identifier,
rootNodeLabel: 'Total',
drilldowns: ['category', 'subcategory'],
cuts: ['year:' + OpenSpending.year],
breakdown: 'subcategory',
callback: dataLoaded
});
});
}
});
</script>
<div class="bubbletree-wrapper">
<div id="bubbletree" class="bubbletree"></div>
</div>
</div>
<!-- Disqus comments -->
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'koganeispending'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>