-
Notifications
You must be signed in to change notification settings - Fork 3
/
work.html
49 lines (48 loc) · 1.72 KB
/
work.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Education</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3-funnel.js"></script>
<link rel="stylesheet" href="styles/index.css" />
</head>
<body>
<div class="container">
<div class="main edu-main">
<script>
d3.csv("../assets/work/work.csv").then(function (data) {
var columnValues = data.map(function (d) {
return d.value;
});
var columnLength = columnValues.length - 1;
d3.select("#work-title-h2").text(columnLength);
});
</script>
<div class="row edu-row edu-title">
<h2 id="work-title-h2"></h2>
<p>Individuals Facing Work-Related Stress</p>
</div>
<div class="row edu-row edu-content">
<div class="col edu-col col-funnel">
<div class="chart-title funnel-title">
<h3>Frequent Contemplation of Suicide</h3>
</div>
<svg id="funnel-chart" width="550px" height="300px"></svg>
<div id="tooltip"></div>
<script src="scripts/FunnelChart/WorkFunnelChart.js"></script>
</div>
<div class="col edu-col col-pie">
<div class="chart-title pie-title">
<h3>Level of Depression</h3>
</div>
<svg id="pie-chart"></svg>
<script src="scripts/PieChart/WorkPieChart.js"></script>
</div>
</div>
</div>
</div>
</body>
</html>