author | nowmad@nowmads-macbook-pro.local |
Thu, 10 Dec 2015 16:51:46 +0100 | |
changeset 44 | 6e2c500adca0 |
parent 39 | c693e8673d5b |
child 45 | b9adc23abd01 |
permissions | -rw-r--r-- |
39
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
1 |
import Ember from 'ember'; |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
2 |
|
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
3 |
export default Ember.Component.extend({ |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
4 |
didInsertElement: function(){ |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
5 |
var data = google.visualization.arrayToDataTable([ |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
6 |
['Location', 'Parent', 'Market trade volume (size)', 'Market increase/decrease (color)'], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
7 |
['Global', null, 0, 0], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
8 |
['America', 'Global', 0, 0], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
9 |
['Europe', 'Global', 0, 0], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
10 |
['Asia', 'Global', 0, 0], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
11 |
['Australia', 'Global', 0, 0], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
12 |
['Africa', 'Global', 0, 0], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
13 |
['Brazil', 'America', 11, 10], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
14 |
['USA', 'America', 52, 31], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
15 |
['Mexico', 'America', 24, 12], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
16 |
['Canada', 'America', 16, -23], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
17 |
['France', 'Europe', 42, -11], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
18 |
['Germany', 'Europe', 31, -2], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
19 |
['Sweden', 'Europe', 22, -13], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
20 |
['Italy', 'Europe', 17, 4], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
21 |
['UK', 'Europe', 21, -5], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
22 |
['China', 'Asia', 36, 4], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
23 |
['Japan', 'Asia', 20, -12], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
24 |
['India', 'Asia', 40, 63], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
25 |
['Laos', 'Asia', 4, 34], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
26 |
['Mongolia', 'Asia', 1, -5], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
27 |
['Israel', 'Asia', 12, 24], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
28 |
['Iran', 'Asia', 18, 13], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
29 |
['Pakistan', 'Asia', 11, -52], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
30 |
['Egypt', 'Africa', 21, 0], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
31 |
['S. Africa', 'Africa', 30, 43], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
32 |
['Sudan', 'Africa', 12, 2], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
33 |
['Congo', 'Africa', 10, 12], |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
34 |
['Zaire', 'Africa', 8, 10] |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
35 |
]); |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
36 |
|
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
37 |
var tree = new google.visualization.TreeMap(document.getElementById('chart_div')); |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
38 |
|
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
39 |
tree.draw(data, { |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
40 |
minColor: '#f00', |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
41 |
midColor: '#ddd', |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
42 |
maxColor: '#0d0', |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
43 |
headerHeight: 15, |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
44 |
fontColor: 'black', |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
45 |
showScale: true |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
46 |
}); |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
47 |
} |
c693e8673d5b
add visu-langue with google treemap
nowmad@23.1.168.192.in-addr.arpa
parents:
diff
changeset
|
48 |
}); |