-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgroups.html
More file actions
43 lines (43 loc) · 1.34 KB
/
Copy pathgroups.html
File metadata and controls
43 lines (43 loc) · 1.34 KB
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
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
.chartDiv div {
font: 10px sans-serif;
background-color: steelblue;
text-align: right;
padding: 3px;
margin: 1px;
color: white;
}
</style>
</head>
<body>
<div id="chart"></div>
<script src="groups.js"></script>
<div class="chartDiv">
<script>
var data = [4, 8, 15, 16, 23, 42];
d3.select(".chartDiv")
.selectAll("div")
.data(data)
.enter().append("div")
.style("width", function (d) {
return d * 10 + "px";
})
.text(function (d) {
return d;
});
</script>
</div>
</body>
</html>