forked from sdqali/d3-dojo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscatterplot.html
47 lines (37 loc) · 827 Bytes
/
scatterplot.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
<html>
<head>
<title>Bowling Debuts</title>
<script type="text/javascript" src="d3/d3.v2.js"></script>
<link type="text/css" rel="stylesheet" href="scatterplot.css"></link>
</head>
<body>
<div class="vis">
</div>
<script type="text/javascript">
var width = 1000;
var height = 500;
var padding = 30;
var colorMap = {
"India": "#1f77b4",
"Pakistan": "#637939"
};
// Draw SVG
var svg = d3.select(".vis")
.append("svg")
.attr("width", width)
.attr("height", height);
// Load the data and do stuff
d3.json("bowlers.json", function(dataset) {
// Define xScale
// Define ySclale
// Define radiusScale
// Draw circles bound to dataset
// Add alt text
// Add xAxis
// Add yAxis
// Add xRule
// Add yRule
});
</script>
</body>
</html>