-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path02-svg-and-d3-selectors.html
54 lines (46 loc) · 1.17 KB
/
02-svg-and-d3-selectors.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
<html>
<head>
<meta charset="utf-8">
<title>D3 and SVG</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
<style>
svg {
background: #f9f9f9;
display: block;
margin: 0 auto;
}
h1 { margin-bottom: 2rem; }
body {
padding-top: 2rem;
padding-bottom: 2rem;
}
h3 {
margin-top: 3rem;
margin-bottom: 1rem;
}
.container {
max-width: 46rem;
}
img.block {
display: block;
border: solid #333 1p;
margin: 0 auto;
}
</style>
</head>
</head>
<body>
<div class="container">
<h1>SVG, meet D3</h1>
<p>We're going to use D3 to control our SVG.</p>
<p>You'll need to edit <code>02-svg-and-d3-selectors.js</code> to make things happen.</p>
<svg height="500" width="800">
<circle></circle>
</svg>
<!-- This is D3, our graphing library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.7.0/d3.min.js"></script>
<!-- Now we include our actual visualization -->
<script src="02-svg-and-d3-selectors.js"></script>
</div>
</body>
</html>