-
Notifications
You must be signed in to change notification settings - Fork 0
/
result.html
75 lines (66 loc) · 2.15 KB
/
result.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Power Law</title>
<link rel="icon" href="src/main/resources/logo.svg">
<link rel="stylesheet" href="src/main/resources/css/Chart.min.css">
</head>
<body>
<header>
<h1 style="margin-top:16px; text-align: center;">Power Law</h1>
<h3 style="text-align: center;">
<span>Alpha:</span> <span style="color: #F1444B;">5.49</span>
<span>Gamma:</span> <span style="color: #49D43C;">1.56</span>
</h3>
<h3 style="text-align: center;"><span>Total time:</span> <span>11</span>s</h3>
</header>
<main style="width: 1600px; height: 800px; margin: auto">
<canvas id="chart"></canvas>
</main>
<script src="src/main/resources/js/Chart.min.js"></script>
<script>
let edgeCounts = [0.0,1.0,2.0,3.0];
let edgeCountFreq = [5.491972078870857,3.9744656357372423,2.660865478003869,0.0];
let cxt = document.getElementById("chart").getContext("2d");
let chart = new Chart(cxt, {
type: "line",
responsive: false,
width: 500,
height: 600,
data: {
labels: edgeCounts,
datasets: [{
label: "Frequency of Nodes by Edge Count",
data: edgeCountFreq,
borderColor: "#4A3BD2",
fill: false
}]
},
options: {
scales: {
xAxes: [{
scaleLabel: {
display: true,
labelString: 'Edge Count',
fontStyle : 'bold',
fontSize : 18
},
ticks: {callback: label => `10^${label}`}
}],
yAxes: [{
scaleLabel: {
display: true,
labelString: 'Number of Nodes',
fontStyle : 'bold',
fontSize : 18
},
ticks: {callback: label => `10^${label}`}
}]
}
}
});
</script>
</body>
</html>