-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.html
46 lines (46 loc) · 1.11 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SpiderChart Example</title>
</head>
<body>
<canvas id="chart"></canvas>
<script src="SpiderChart.js"></script>
<script>
let sc = new SpiderChart('chart',250,250)
let entity_one = {
"id": 'test1',
"data": [
50,
40,
60,
50,
70
],
"color": 'rgba(255, 178, 102, 0.3)'
}
let entity_two = {
"id": 'test2',
"data": [
80,
90,
20,
70,
40
],
"color": 'rgba(102, 255, 102, 0.3)'
}
sc.setOffset(1.05);
sc.setGrid('lightgray', 1, 0.5);
sc.setParams(['aa','bb','cc','dd','ee']);
sc.addEntity(entity_one);
sc.addEntity(entity_two);
// sc.addEntity(entity_two);
// sc.addEntity(entity_two);
// sc.addEntity(entity_two);
sc.renderGraph();
sc.renderLegend();
</script>
</body>
</html>