-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
129 lines (108 loc) · 1.78 KB
/
index.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
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
color: white;
background-color: #222;
}
text {
fill: white;
}
.label {
font-weight: 100;
font-size: 13px;
}
.axis text {
font: 10px sans-serif;
font-weight: 100;
fill: whitesmoke;
}
.outline-rect {
stroke: white;
stroke-width: 1px;
fill: none;
}
.axis path,
.axis line {
fill: none;
stroke: whitesmoke;
shape-rendering: crispEdges;
}
#content {
width: 800px;
margin: 0px auto;
}
#cohort-bar {
text-align: center;
}
.obesity-bar {
fill: white;
}
.bar, .obesity-bar {
stroke: #222;
stroke-width: 2px;
cursor: pointer;
}
.birthpoint {
cursor: pointer;
}
.title {
text-align: center;
font-size: 3em;
font-weight: 100;
margin: 40px 0;
}
.title .highlight {
color: #e74c3c;
}
.text-healthy.highlight, .text-obese.highlight {
fill: black !important;
font-weight: bold;
}
.hide {
display: none;
}
.obese-label {
fill: white;
}
.obese-label, .healthy-label {
font-size: 11px;
font-weight: 100;
}
.black-cover {
fill: #222;
}
.white-cover {
fill:white;
}
rect.highlight {
fill: white;
}
</style>
<body>
<div id="content">
<div class="title">Crossing the <span class="highlight">15%</span> obesity threshold</div>
<div id="cohort-bar"></div>
</div>
<script src="d3.v3.min.js"></script>
<script src="apc_percents.js"></script>
<script src="colorbrewer.js"></script>
<script src="cohort.js"></script>
<script>
var cohort = Cohort({
width: 830,
height: 430,
selection: d3.select('#cohort-bar'),
margin: {
top: 130,
left: 100,
bottom: 0,
right: 235
}
})
cohort();
cohort.runCover();
</script>
</body>