-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
61 lines (55 loc) · 1.25 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<style>
table {
border-collapse: collapse;
border: 2px black solid;
font: 12px sans-serif;
}
td {
border: 1px black solid;
padding: 5px;
}
</style>
<style>
div.a {
white-space: nowrap;
width: 100px;
overflow: hidden;
text-overflow: ellipsis;
border: 1px solid #000000;
}
div.a:hover {
overflow: scroll;
}
</style>
</head>
<body>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script type="text/javascript" charset="utf-8">
d3.text("data.csv", function (data) {
//var prasedCSV = d3.csv.parseRows(data);
var parsedCSV = d3.csvParseRows(data);
var container = d3
.select("body")
.append("table")
.selectAll("tr")
.data(parsedCSV)
.enter()
.append("tr")
.selectAll("td")
.data(function (d) {
return d;
})
.enter()
.append("td")
.text(function (d) {
return d;
});
});
</script>
<div id="container" class="a"></div>
</body>
</html>