tree.rb 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,84 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <script src="http://d3js.org/d3.v2.js"></script>
6
-
7
-
8
- <script type="text/javascript">
9
- var width = 960,
10
- height = 500,
11
- color = d3.scale.category20c();
12
-
13
- var treemap = d3.layout.treemap()
14
- .size([width, height])
15
- .sticky(true)
16
- .value(function (d) {
17
- return d.size;
18
- });
19
-
20
- var div = d3.select("#chart").append("div")
21
- .style("position", "relative")
22
- .style("width", width + "px")
23
- .style("height", height + "px");
24
-
25
- d3.json("d3_tree_rb_output.json", function (json) {
26
- div.data([json]).selectAll("div")
27
- .data(treemap.nodes)
28
- .enter().append("div")
29
- .attr("class", "cell")
30
- .style("background", function (d) {
31
- return d.children ? color(d.name) : null;
32
- })
33
- .call(cell)
34
- .text(function (d) {
35
- return d.children ? null : d.name;
36
- });
37
-
38
- d3.select("#size").on("click", function () {
39
- div.selectAll("div")
40
- .data(treemap.value(function (d) {
41
- return d.size;
42
- }))
43
- .transition()
44
- .duration(1500)
45
- .call(cell);
46
-
47
- d3.select("#size").classed("active", true);
48
- d3.select("#count").classed("active", false);
49
- });
50
-
51
- d3.select("#count").on("click", function () {
52
- div.selectAll("div")
53
- .data(treemap.value(function (d) {
54
- return 1;
55
- }))
56
- .transition()
57
- .duration(1500)
58
- .call(cell);
59
-
60
- d3.select("#size").classed("active", false);
61
- d3.select("#count").classed("active", true);
62
- });
63
- });
64
-
65
- function cell() {
66
- this
67
- .style("left", function (d) {
68
- return d.x + "px";
69
- })
70
- .style("top", function (d) {
71
- return d.y + "px";
72
- })
73
- .style("width", function (d) {
74
- return Math.max(0, d.dx - 1) + "px";
75
- })
76
- .style("height", function (d) {
77
- return Math.max(0, d.dy - 1) + "px";
78
- });
79
- }
80
-
81
- </script>
82
-
83
- </body>
84
- </html>
@@ -1,381 +0,0 @@
1
-
2
- j = {
3
- "name": "flare",
4
- "children": [
5
- {
6
- "name": "analytics",
7
- "children": [
8
- {
9
- "name": "cluster",
10
- "children": [
11
- {"name": "AgglomerativeCluster", "size": 3938},
12
- {"name": "CommunityStructure", "size": 3812},
13
- {"name": "HierarchicalCluster", "size": 6714},
14
- {"name": "MergeEdge", "size": 743}
15
- ]
16
- },
17
- {
18
- "name": "graph",
19
- "children": [
20
- {"name": "BetweennessCentrality", "size": 3534},
21
- {"name": "LinkDistance", "size": 5731},
22
- {"name": "MaxFlowMinCut", "size": 7840},
23
- {"name": "ShortestPaths", "size": 5914},
24
- {"name": "SpanningTree", "size": 3416}
25
- ]
26
- },
27
- {
28
- "name": "optimization",
29
- "children": [
30
- {"name": "AspectRatioBanker", "size": 7074}
31
- ]
32
- }
33
- ]
34
- },
35
- {
36
- "name": "animate",
37
- "children": [
38
- {"name": "Easing", "size": 17010},
39
- {"name": "FunctionSequence", "size": 5842},
40
- {
41
- "name": "interpolate",
42
- "children": [
43
- {"name": "ArrayInterpolator", "size": 1983},
44
- {"name": "ColorInterpolator", "size": 2047},
45
- {"name": "DateInterpolator", "size": 1375},
46
- {"name": "Interpolator", "size": 8746},
47
- {"name": "MatrixInterpolator", "size": 2202},
48
- {"name": "NumberInterpolator", "size": 1382},
49
- {"name": "ObjectInterpolator", "size": 1629},
50
- {"name": "PointInterpolator", "size": 1675},
51
- {"name": "RectangleInterpolator", "size": 2042}
52
- ]
53
- },
54
- {"name": "ISchedulable", "size": 1041},
55
- {"name": "Parallel", "size": 5176},
56
- {"name": "Pause", "size": 449},
57
- {"name": "Scheduler", "size": 5593},
58
- {"name": "Sequence", "size": 5534},
59
- {"name": "Transition", "size": 9201},
60
- {"name": "Transitioner", "size": 19975},
61
- {"name": "TransitionEvent", "size": 1116},
62
- {"name": "Tween", "size": 6006}
63
- ]
64
- },
65
- {
66
- "name": "data",
67
- "children": [
68
- {
69
- "name": "converters",
70
- "children": [
71
- {"name": "Converters", "size": 721},
72
- {"name": "DelimitedTextConverter", "size": 4294},
73
- {"name": "GraphMLConverter", "size": 9800},
74
- {"name": "IDataConverter", "size": 1314},
75
- {"name": "JSONConverter", "size": 2220}
76
- ]
77
- },
78
- {"name": "DataField", "size": 1759},
79
- {"name": "DataSchema", "size": 2165},
80
- {"name": "DataSet", "size": 586},
81
- {"name": "DataSource", "size": 3331},
82
- {"name": "DataTable", "size": 772},
83
- {"name": "DataUtil", "size": 3322}
84
- ]
85
- },
86
- {
87
- "name": "display",
88
- "children": [
89
- {"name": "DirtySprite", "size": 8833},
90
- {"name": "LineSprite", "size": 1732},
91
- {"name": "RectSprite", "size": 3623},
92
- {"name": "TextSprite", "size": 10066}
93
- ]
94
- },
95
- {
96
- "name": "flex",
97
- "children": [
98
- {"name": "FlareVis", "size": 4116}
99
- ]
100
- },
101
- {
102
- "name": "physics",
103
- "children": [
104
- {"name": "DragForce", "size": 1082},
105
- {"name": "GravityForce", "size": 1336},
106
- {"name": "IForce", "size": 319},
107
- {"name": "NBodyForce", "size": 10498},
108
- {"name": "Particle", "size": 2822},
109
- {"name": "Simulation", "size": 9983},
110
- {"name": "Spring", "size": 2213},
111
- {"name": "SpringForce", "size": 1681}
112
- ]
113
- },
114
- {
115
- "name": "query",
116
- "children": [
117
- {"name": "AggregateExpression", "size": 1616},
118
- {"name": "And", "size": 1027},
119
- {"name": "Arithmetic", "size": 3891},
120
- {"name": "Average", "size": 891},
121
- {"name": "BinaryExpression", "size": 2893},
122
- {"name": "Comparison", "size": 5103},
123
- {"name": "CompositeExpression", "size": 3677},
124
- {"name": "Count", "size": 781},
125
- {"name": "DateUtil", "size": 4141},
126
- {"name": "Distinct", "size": 933},
127
- {"name": "Expression", "size": 5130},
128
- {"name": "ExpressionIterator", "size": 3617},
129
- {"name": "Fn", "size": 3240},
130
- {"name": "If", "size": 2732},
131
- {"name": "IsA", "size": 2039},
132
- {"name": "Literal", "size": 1214},
133
- {"name": "Match", "size": 3748},
134
- {"name": "Maximum", "size": 843},
135
- {
136
- "name": "methods",
137
- "children": [
138
- {"name": "add", "size": 593},
139
- {"name": "and", "size": 330},
140
- {"name": "average", "size": 287},
141
- {"name": "count", "size": 277},
142
- {"name": "distinct", "size": 292},
143
- {"name": "div", "size": 595},
144
- {"name": "eq", "size": 594},
145
- {"name": "fn", "size": 460},
146
- {"name": "gt", "size": 603},
147
- {"name": "gte", "size": 625},
148
- {"name": "iff", "size": 748},
149
- {"name": "isa", "size": 461},
150
- {"name": "lt", "size": 597},
151
- {"name": "lte", "size": 619},
152
- {"name": "max", "size": 283},
153
- {"name": "min", "size": 283},
154
- {"name": "mod", "size": 591},
155
- {"name": "mul", "size": 603},
156
- {"name": "neq", "size": 599},
157
- {"name": "not", "size": 386},
158
- {"name": "or", "size": 323},
159
- {"name": "orderby", "size": 307},
160
- {"name": "range", "size": 772},
161
- {"name": "select", "size": 296},
162
- {"name": "stddev", "size": 363},
163
- {"name": "sub", "size": 600},
164
- {"name": "sum", "size": 280},
165
- {"name": "update", "size": 307},
166
- {"name": "variance", "size": 335},
167
- {"name": "where", "size": 299},
168
- {"name": "xor", "size": 354},
169
- {"name": "_", "size": 264}
170
- ]
171
- },
172
- {"name": "Minimum", "size": 843},
173
- {"name": "Not", "size": 1554},
174
- {"name": "Or", "size": 970},
175
- {"name": "Query", "size": 13896},
176
- {"name": "Range", "size": 1594},
177
- {"name": "StringUtil", "size": 4130},
178
- {"name": "Sum", "size": 791},
179
- {"name": "Variable", "size": 1124},
180
- {"name": "Variance", "size": 1876},
181
- {"name": "Xor", "size": 1101}
182
- ]
183
- },
184
- {
185
- "name": "scale",
186
- "children": [
187
- {"name": "IScaleMap", "size": 2105},
188
- {"name": "LinearScale", "size": 1316},
189
- {"name": "LogScale", "size": 3151},
190
- {"name": "OrdinalScale", "size": 3770},
191
- {"name": "QuantileScale", "size": 2435},
192
- {"name": "QuantitativeScale", "size": 4839},
193
- {"name": "RootScale", "size": 1756},
194
- {"name": "Scale", "size": 4268},
195
- {"name": "ScaleType", "size": 1821},
196
- {"name": "TimeScale", "size": 5833}
197
- ]
198
- },
199
- {
200
- "name": "util",
201
- "children": [
202
- {"name": "Arrays", "size": 8258},
203
- {"name": "Colors", "size": 10001},
204
- {"name": "Dates", "size": 8217},
205
- {"name": "Displays", "size": 12555},
206
- {"name": "Filter", "size": 2324},
207
- {"name": "Geometry", "size": 10993},
208
- {
209
- "name": "heap",
210
- "children": [
211
- {"name": "FibonacciHeap", "size": 9354},
212
- {"name": "HeapNode", "size": 1233}
213
- ]
214
- },
215
- {"name": "IEvaluable", "size": 335},
216
- {"name": "IPredicate", "size": 383},
217
- {"name": "IValueProxy", "size": 874},
218
- {
219
- "name": "math",
220
- "children": [
221
- {"name": "DenseMatrix", "size": 3165},
222
- {"name": "IMatrix", "size": 2815},
223
- {"name": "SparseMatrix", "size": 3366}
224
- ]
225
- },
226
- {"name": "Maths", "size": 17705},
227
- {"name": "Orientation", "size": 1486},
228
- {
229
- "name": "palette",
230
- "children": [
231
- {"name": "ColorPalette", "size": 6367},
232
- {"name": "Palette", "size": 1229},
233
- {"name": "ShapePalette", "size": 2059},
234
- {"name": "SizePalette", "size": 2291}
235
- ]
236
- },
237
- {"name": "Property", "size": 5559},
238
- {"name": "Shapes", "size": 19118},
239
- {"name": "Sort", "size": 6887},
240
- {"name": "Stats", "size": 6557},
241
- {"name": "Strings", "size": 22026}
242
- ]
243
- },
244
- {
245
- "name": "vis",
246
- "children": [
247
- {
248
- "name": "axis",
249
- "children": [
250
- {"name": "Axes", "size": 1302},
251
- {"name": "Axis", "size": 24593},
252
- {"name": "AxisGridLine", "size": 652},
253
- {"name": "AxisLabel", "size": 636},
254
- {"name": "CartesianAxes", "size": 6703}
255
- ]
256
- },
257
- {
258
- "name": "controls",
259
- "children": [
260
- {"name": "AnchorControl", "size": 2138},
261
- {"name": "ClickControl", "size": 3824},
262
- {"name": "Control", "size": 1353},
263
- {"name": "ControlList", "size": 4665},
264
- {"name": "DragControl", "size": 2649},
265
- {"name": "ExpandControl", "size": 2832},
266
- {"name": "HoverControl", "size": 4896},
267
- {"name": "IControl", "size": 763},
268
- {"name": "PanZoomControl", "size": 5222},
269
- {"name": "SelectionControl", "size": 7862},
270
- {"name": "TooltipControl", "size": 8435}
271
- ]
272
- },
273
- {
274
- "name": "data",
275
- "children": [
276
- {"name": "Data", "size": 20544},
277
- {"name": "DataList", "size": 19788},
278
- {"name": "DataSprite", "size": 10349},
279
- {"name": "EdgeSprite", "size": 3301},
280
- {"name": "NodeSprite", "size": 19382},
281
- {
282
- "name": "render",
283
- "children": [
284
- {"name": "ArrowType", "size": 698},
285
- {"name": "EdgeRenderer", "size": 5569},
286
- {"name": "IRenderer", "size": 353},
287
- {"name": "ShapeRenderer", "size": 2247}
288
- ]
289
- },
290
- {"name": "ScaleBinding", "size": 11275},
291
- {"name": "Tree", "size": 7147},
292
- {"name": "TreeBuilder", "size": 9930}
293
- ]
294
- },
295
- {
296
- "name": "events",
297
- "children": [
298
- {"name": "DataEvent", "size": 2313},
299
- {"name": "SelectionEvent", "size": 1880},
300
- {"name": "TooltipEvent", "size": 1701},
301
- {"name": "VisualizationEvent", "size": 1117}
302
- ]
303
- },
304
- {
305
- "name": "legend",
306
- "children": [
307
- {"name": "Legend", "size": 20859},
308
- {"name": "LegendItem", "size": 4614},
309
- {"name": "LegendRange", "size": 10530}
310
- ]
311
- },
312
- {
313
- "name": "operator",
314
- "children": [
315
- {
316
- "name": "distortion",
317
- "children": [
318
- {"name": "BifocalDistortion", "size": 4461},
319
- {"name": "Distortion", "size": 6314},
320
- {"name": "FisheyeDistortion", "size": 3444}
321
- ]
322
- },
323
- {
324
- "name": "encoder",
325
- "children": [
326
- {"name": "ColorEncoder", "size": 3179},
327
- {"name": "Encoder", "size": 4060},
328
- {"name": "PropertyEncoder", "size": 4138},
329
- {"name": "ShapeEncoder", "size": 1690},
330
- {"name": "SizeEncoder", "size": 1830}
331
- ]
332
- },
333
- {
334
- "name": "filter",
335
- "children": [
336
- {"name": "FisheyeTreeFilter", "size": 5219},
337
- {"name": "GraphDistanceFilter", "size": 3165},
338
- {"name": "VisibilityFilter", "size": 3509}
339
- ]
340
- },
341
- {"name": "IOperator", "size": 1286},
342
- {
343
- "name": "label",
344
- "children": [
345
- {"name": "Labeler", "size": 9956},
346
- {"name": "RadialLabeler", "size": 3899},
347
- {"name": "StackedAreaLabeler", "size": 3202}
348
- ]
349
- },
350
- {
351
- "name": "layout",
352
- "children": [
353
- {"name": "AxisLayout", "size": 6725},
354
- {"name": "BundledEdgeRouter", "size": 3727},
355
- {"name": "CircleLayout", "size": 9317},
356
- {"name": "CirclePackingLayout", "size": 12003},
357
- {"name": "DendrogramLayout", "size": 4853},
358
- {"name": "ForceDirectedLayout", "size": 8411},
359
- {"name": "IcicleTreeLayout", "size": 4864},
360
- {"name": "IndentedTreeLayout", "size": 3174},
361
- {"name": "Layout", "size": 7881},
362
- {"name": "NodeLinkTreeLayout", "size": 12870},
363
- {"name": "PieLayout", "size": 2728},
364
- {"name": "RadialTreeLayout", "size": 12348},
365
- {"name": "RandomLayout", "size": 870},
366
- {"name": "StackedAreaLayout", "size": 9121},
367
- {"name": "TreeMapLayout", "size": 9191}
368
- ]
369
- },
370
- {"name": "Operator", "size": 2490},
371
- {"name": "OperatorList", "size": 5248},
372
- {"name": "OperatorSequence", "size": 4190},
373
- {"name": "OperatorSwitch", "size": 2581},
374
- {"name": "SortOperator", "size": 2023}
375
- ]
376
- },
377
- {"name": "Visualization", "size": 16540}
378
- ]
379
- }
380
- ]
381
- }