-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (37 loc) · 937 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="d3_radar.js"></script>
<script>
var data_promise = d3.csv("data.csv",function(d){
var result = {
key:d.key,
value:+d.value
};
return result
});
async function initial() {
// A successful promise will evalue to the value. d3v5 behaviour
var dataset = await data_promise;
var chart = new Radar_Chart({
cfData:dataset,
width:250,
height:250,
padding:50,
circleRadius:3,
maxWidth:'100%',
speed:1000,
element:document.querySelector("#chart-container"),
shapeFill:"#adcae6"
});
console.log(chart);
};
initial();
</script>
</head>
<body>
<div float="left" class="chart-container" id="chart-container"></div>
<div class="button-container"></div>
</body>
</html>