-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.htm
86 lines (80 loc) · 3.42 KB
/
index.htm
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sparkler - Interactive, Faceted Data Visualization</title>
<script language="javascript" type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
<script language="javascript" type="text/javascript" src="flot-ex/jquery.flot.selection.js"></script>
<script language="javascript" type="text/javascript" src="flot-ex/jquery.flot.axislabels.js"></script>
<script language="javascript" type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script>
<script language="javascript" type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.10/backbone-min.js"></script>
<script language="javascript" type="text/javascript" src="js/sparkler.util.js"></script>
<script language="javascript" type="text/javascript" src="js/sparkler.model.panel.js"></script>
<script language="javascript" type="text/javascript" src="js/sparkler.model.panels.js"></script>
<script language="javascript" type="text/javascript" src="js/sparkler.model.app.js"></script>
<script language="javascript" type="text/javascript" src="js/sparkler.view.panel.js"></script>
<script language="javascript" type="text/javascript" src="js/sparkler.view.app.js"></script>
<script language="javascript" type="text/javascript" src="js/sparkler.view.load.js"></script>
<script language="javascript" type="text/javascript">
function queryObj() {
var result = {}, keyValuePairs = location.search.slice(1).split('&');
keyValuePairs.forEach(function(keyValuePair) {
keyValuePair = keyValuePair.split('=');
result[keyValuePair[0]] = keyValuePair[1] || '';
});
return result;
}
function ondataloaded() {
initpanels();
}
$(document).ready(function() {
//initdataloadui();
//initdata(initpanels);
var app = new sparkler.model.app();
//app.setData(data);
//var appview = new sparkler.view.app({model:app});
//appview.render();
//app.addPanel();
//var appview = new sparkler.view.load({model:app});
//appview.render();
window.app = app;
app.render();
if (queryObj()["data"]) {
app.dataLoading();
$.ajax({
url: queryObj()["data"],
method: 'GET',
dataType: 'json',
error: function(xhr, ts, err) {
app.dataFailed({errors: ["Ajax error: " + err]});
},
success: function(data) {
app.dataLoaded({data: data})
}
});
}
//window.appview = appview;
})
</script>
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans" rel="stylesheet">
<link rel="stylesheet" href="main.css" type="text/css"/>
</head>
<body>
<div class="header">
<h1>Sparkler</h1>
<span class="tagline">Interactive, Faceted Data Visualization</span>
<div class="header-right">
<a class="active" href="/">Plotter</a>
<a href="about.htm">About</a>
</div>
</div>
<div id="sparkler"></div>
<h3>Selection Instructions</h3>
<p>You may select ranges of points by clicking and dragging. Totals appear below plots</p>
<ul>
<li>Hold down shift to add to selection</li>
<li>Hold down control (or command on a Mac) to remove from selection</li>
</ul>
</body>
</html>