forked from tmcw/shotspotter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.js
33 lines (29 loc) · 1.08 KB
/
site.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
d3.json('exclude.json')
.on('load', function(exclude) {
d3.json('minutes.json')
.on('load', function(data) {
var form = d3.select('body')
.append('form');
var exc = form
.append('input')
.attr('type', 'checkbox')
.attr('id', 'include');
form
.append('label')
.attr('for', 'include')
.text('include NYE, New Years, and July 4th');
var div = d3.select('body').append('div')
.datum(exclude)
.call(circadian()
.width(window.innerWidth)
.height(window.innerWidth));
exc.on('click', function() {
div.datum(this.checked ? data: exclude)
.call(circadian()
.width(window.innerWidth)
.height(window.innerWidth));
});
})
.get();
})
.get();