forked from smurp/huviz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yegodd.html
151 lines (146 loc) · 4.89 KB
/
yegodd.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
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
<!DOCTYPE html>
<html>
<head>
<title>Edmonton Open Data Visualization</title>
<link href="/css/huvis.css" rel="stylesheet" type="text/css">
<link href="/css/huvis_controls.css" rel="stylesheet" type="text/css">
<link href="/css/lariat.css" rel="stylesheet" type="text/css">
<link href="/css/CRRT.css" rel="stylesheet" type="text/css">
<link href="/css/gclui.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="graph_controls">
<div>
<label title="the amount bigger than a normal label the currently selected one is">
focused node mag.
<input name="focused_mag" type="range"
value="1.4" min="1" max="3" step=".1"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="the size of the font">
label size (em)
<input name="label_em" type="range"
value=".3" min=".2" max="4" step=".1"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="the repulsive charge between nodes">
charge
<input name="charge" type="range"
value="-30" max="10" min="-2000" step="10"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="the attractive force keeping nodes centered">
gravity
<input name="gravity" type="range"
value="0.3" min="0" max="1" step=".05"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="how big the shelf is">
shelf radius
<input name="shelf_radius" type="range"
value="0.9" min="0.1" max="3" step=".05"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="how much magnification happens">
fisheye zoom
<input name="fisheye_zoom" type="range"
value="6.0" min="1" max="20" step=".2"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="how big the fisheye is">
fisheye radius
<input name="fisheye_radius" type="range"
value="100" min="40" max="2000" step="20"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="how fat the nodes are">
node radius
<input name="node_radius" type="range"
value=".5" min=".2" max="8" step=".1"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="how long the lines are">
link distance
<input name="link_distance" type="range"
value="60" min="5" max="200" step="2"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="how thick the lines are">
line thickness
<input name="edge_width" type="range"
value="1" min="0.2" max="10" step=".2"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="how much curvature lines have">
sway fraction
<input name="swayfrac" type="range"
value="0" min="0" max=".2" step=".001"
onchange="HVZ.update_graph_settings(this)">
</label>
</div>
<div>
<label title="which file to load">
data set
<select class="file_picker" onchange="HVZ.load_file(this)" >
<option>/data/yeg.json</option>
</select>
</label>
</div>
</div>
<div id="snippet_box">
</div>
<div id="huvis_controls">
<div id="gclui"></div>
</div>
<div id="vis" class="underneath" style="z-index:-3"></div>
<div id="viscanvas" class="underneath"></div>
<div id="status" onclick="clear_box()"></div>
<!--
<script src="http://d3js.org/d3.v3.js" charset="utf-8"></script>
-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.exports = {};</script>
<script src="application.js?13"></script>
<script>
var gcl = require('graphcommandlanguage');
if (location.hash.match(/testsuite/)){
window.addEventListener('showgraph',testsuite);
}
//window.addEventListener('showgraph',function(){ });
document.addEventListener('touchmove', function(e) {
e.preventDefault();
}, false);
var HVZ;
window.addEventListener('load',function(){
huviz = require('huviz');
HVZ = new huviz.Socrata();
HVZ.load_file();
});
/*
window.addEventListener('newsubject',function(e){
alert("new subject: "+e.detail.sid)
});
*/
</script>
</body>
</html>