-
Notifications
You must be signed in to change notification settings - Fork 1
/
account.js
308 lines (295 loc) · 12.7 KB
/
account.js
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
// http://blog.thomsonreuters.com/index.php/mobile-patent-suits-graphic-of-the-day/
var links = [
{
"source":"GBJVDMEE5LAWLTITXLI2UE3B6FJIPRWEK44K2HNDOR7SXA3F7L2R73UT",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GB5LPE7J3NBHF7LYKHM5A545FP5TYQHBJGLQ4YHC3LJWAIGXD35CSRAY",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GB52YSJYF4OGNFNF3W7GR42GFAFXDPA6HQBZC6EPIPIEGJMI4ECAQI3L",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBJ7ZYE34DQ2GXMUT5JV6QS27F3464DQZCLVONIAF3LRQFGWTXQ5LUN4",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GACOCG44LUC73OX4PP6MA7B4VXBHCKJG7VQGW63F2DLZVBL62K2UKJVU",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GATSLMDSVV4MQWGDUOL4XQ65LZ46GJ5G7N3JFEN332JJCGX52F5AODSK",
"type":"licensing",
"target":"GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H"
},{
"source":"GD7CVKY7Z2KRCLA5UVBW7VPJ5RBYWZR7XJZNWNU3WQC2MXZOR4PB2VFH",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDGOKHIRX63EIAXKVI77BQV7LMDUH7DR4BMDDU77DJUXLPUU5HAXGN64",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDWQR5OEJ5DYHEUU3L2NH3GDSCMKJUYEAUMFRNLQUYVN4ZLG7VRBI5CV",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GA2CDGRPG5MN4IWLVJ4L3MB4OCAAHDJ2P7SJ65C5YQESTROEM46O4FAK",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDPKYPW5A2PYCC2FPBCO7R2G5FHXMQBG6TX6IQYYYMXKCHXF2YNM3BOX",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GB2FAEJLDE56FX5JXFLDR7CHGUG34KAJZSF7E564ZBOROTCG2NQGXDCD",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDHCSNKELQZCXBZGST2MQBTHAOBRU2ZOEOVYEMZ6VCZZ7SNEHQHPBQDU",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GAEZH44THZQMIPO6UOM33OU5K22U3LLQOIBWL7B7OHNXTPK2ECZMQTW2",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDB2JKSEHDCIZ7FO2IZZ6BGRTQCJCMFR2K46TK6MPEP326EHI2DC5CVX",
"type":"licensing",
"target":"GA7VD3IJXCURTNSNNJK5MD4EK7YTJJEFPBC4ZG66TECX7V72RNJZNACY"
},{
"source":"GA7VD3IJXCURTNSNNJK5MD4EK7YTJJEFPBC4ZG66TECX7V72RNJZNACY",
"type":"licensing",
"target":"GD3Z4XT5IZKCYTN3ZQD5HUAVYKQUZPQYG4IHDIJWNW3I5ZJEOQ63L4O6"
},{
"source":"GD5U5XYJU432NQRD32OBDAA5RT2VUYA55PH574SW33T5NTARHEHRNFN3",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GAQC7PUA73DYHDJTA3MZ433B525PPNA4ID7TQ3CVDGZIQQL4RMHY6FSC",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBVVVAQGFMXKPORXA7IY5BV6SGC36NWLC27S4QCHGL3CL3SZQXY3TLIW",
"type":"licensing",
"target":"GA7VD3IJXCURTNSNNJK5MD4EK7YTJJEFPBC4ZG66TECX7V72RNJZNACY"
},{
"source":"GAIABQO7YKUH3YWQI7KRWMHEFJSYVFC5TCIOPIKUPI33IKO6CWLXDSSU",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GD5JC36HFZON4D2Q3E3F43ST4HD7BKKISAU7MZHQGXXFYS4KNLJQVQWT",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GATPISFJXL6CNHVPONQ3AMCCNFEKCPFGXXFO4RUTCKPYEWSBRLNGXFNT",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GAFVJKBQH467X5XDTMEC6P65RSUBPCSDC6XOQ2VDJILROJ5SLB5H3JEV",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GA6G7VKWBLE7X7SGJ6WZ2LSS27GSHJDTOLPXHGDDBG4ZJSAJ43QB7SRJ",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GCUUXKYWLATOQISQDH6PKPLU4LGK4WXQYB2QHGPSUVPXQPHX5ZDIAKAK",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBZKKSR32ISMXURYD5QKEC7TP3IP7JUHH3G2X5TFK24FPT23FVO5TBM4",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBLR36ENOZMABC26DXBA6VZHVCN65C7ZMJG4M52LE5OA43XCESKX35EM",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GA3KFWFLB7JSUJ5T3DFASCXVBKSTTBUFY456R64647JMCRR2PBJTQU3M",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GCBJXNLMSHTDSPDFYHPF4MHNGSWRDXEG2POLRCQDQXL6NVNR7NBO7DVG",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBSFE4PZDYY5WL7TTY5UKVDXDWDAMS4XJVDUNEZQZBHOXGM2MVLLWEXW",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBPJ7QCM4E7IB7N5N5VAFKUZKQVRA5GBNPBGB5IHQJ2D3JSYDFRGANNM",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDRCWVL43UGJY6VQYG2UL2DNWEQVO7OKVRAP55UNIBBUSN5UL4232FKA",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDWADN2HD5TB7VKZG2H4EGHEMJ2GZ7J3YLXYSZF6C4UY7KA4A4JNHHK5",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GAB2ASXINEXHRQCW2JEV2VXJEATMTLIUZ26XDSOU35RMTGNMRVMOMYW7",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDAZHNAK3NX6NIVTP25MZGJOCEZZWO3RCDYFWYHAOPUERDSXRZQ2TW64",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GCROMRAB2RDSYA7GBJALSZT5SOQVMGRLSBHN5N73GW6TU5BQGVAZWZXY",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GANLJWTT5UD3ORPQHLJEUHTLJ3H3DG3OV6SX7MGXWPU6WJT4ZC4IFPW5",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBHQUWKRDDT6MYLBGNCJ6GWTTMWOU7UB4CPO3DUI4F66VMFMLVMNQ3GA",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDVD6735XW6DNLZTEI7AK2LH4ZQ7UWQOD2VBUCKI5ZULOCXJNMVRMFKC",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GD6EQAIKGSHMBVUETVWNGVPDONELHO75K3ORQYXYNRUJX5OXBORUGNBE",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBG7CM36XU6KUU3YZXNNDSEYYWI73ZJHTZLQ5AIT7YWHRQKM3XXH6GBX",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBS2WT7ILPDATFMJIP7ZHFTW5GLNYYY5YDX2U65VYR56V6GLQB46HCOA",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GAF4IY2K6PGD2Z4QLMZOV4ERBTIBIDNDITPSKA37I4EQE6E7VNH6MS7W",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBQMCYLX7NWGVRETHIO2P3U2UMFUBST3QSVTFM3FCZFDWZ7NYTFUHHLJ",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GAFITM44A2BZ2S4LVKRGGDWXADQK2PBZWQAISP2NIIOHBL6WBJR2GSVO",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBLZWJINHGQ4YLBCQVVI6EGUH3OH63KPA2RMBF6RNCPS2IF5GCGF4AZO",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GD3Z4XT5IZKCYTN3ZQD5HUAVYKQUZPQYG4IHDIJWNW3I5ZJEOQ63L4O6",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDDSIBMFPBWX5QBMM7J5CQYWU7YEWRSTDVPXYFWXBU4OCOJLOZ36GF2T",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBJFTW3H7FA7HZY2W4LX6PTU6W2HH3KXTUCDYIEPB373T4VROUQAK6CN",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GCQ6Y2L3KJ5DK3GQ2QYWNO2JFQLLKF5HEKP67PM3NANANESGXSJGG3VY",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GBWLLK6C5HF6PZQ7HKSWHCXH355AFF55SPEYYM7BMDHKO2PIT66QP7GJ",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GAB3OKD24EJ4VO22N7EEQTVDVKX6JX5SKLBJW63GLAW27XEHNP5L7AVC",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GCYRBZHGBN7A5HA5EFFPATCIZQ3OZXXXWXGY4QU7IMSAVH3FC6TMGSO6",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
},{
"source":"GDUPMP7J7FFPB5ACNLOOAFQ45GNDZH5IXKE5ID3YS5P4F26X7BKVXFCA",
"type":"licensing",
"target":"GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H"
},{
"source":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K",
"type":"licensing",
"target":"GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H"
},{
"source":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K",
"type":"licensing",
"target":"GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H"
},{
"source":"GC3AMRZPOWP2VA4JA3CNV23G3KW7FU6GRBYIGJC5HE5ZRET6ILBPP7TY",
"type":"licensing",
"target":"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"
}
];
var nodes = {};
// Compute the distinct nodes from the links.
links.forEach(function(link) {
link.source = nodes[link.source] || (nodes[link.source] = {name: link.source});
link.target = nodes[link.target] || (nodes[link.target] = {name: link.target});
});
var width = 800,
height = 350;
var force = d3.layout.force()
.nodes(d3.values(nodes))
.links(links)
.size([width, height])
.linkDistance(60)
.charge(-300)
.on("tick", tick)
.start();
var svg = d3.select("#relationship").append("svg:svg")
.attr("width", width)
.attr("height", height);
// Per-type markers, as they don't inherit styles.
svg.append("defs").selectAll("marker")
.data(["suit", "licensing", "resolved"])
.enter().append("marker")
.attr("id", function(d) { return d; })
.attr("viewBox", "0 -5 10 10")
.attr("refX", 15)
.attr("refY", -1.5)
.attr("markerWidth", 6)
.attr("markerHeight", 6)
.attr("orient", "auto")
.append("path")
.attr("d", "M0,-5L10,0L0,5");
var path = svg.append("g").selectAll("path")
.data(force.links())
.enter().append("path")
.attr("class", function(d) { return "link " + d.type; })
.attr("marker-end", function(d) { return "url(#" + d.type + ")"; });
var circle = svg.append("g").selectAll("circle")
.data(force.nodes())
.enter().append("circle")
.attr("r", 6)
.call(force.drag);
var text = svg.append("g").selectAll("text")
.data(force.nodes())
.enter().append("text")
.attr("x", 8)
.attr("y", ".31em")
.text(function(d) { return d.name; });
// Use elliptical arc path segments to doubly-encode directionality.
function tick() {
path.attr("d", linkArc);
circle.attr("transform", transform);
text.attr("transform", transform);
}
function linkArc(d) {
var dx = d.target.x - d.source.x,
dy = d.target.y - d.source.y,
dr = Math.sqrt(dx * dx + dy * dy);
return "M" + d.source.x + "," + d.source.y + "A" + dr + "," + dr + " 0 0,1 " + d.target.x + "," + d.target.y;
}
function transform(d) {
return "translate(" + d.x + "," + d.y + ")";
}