-
Notifications
You must be signed in to change notification settings - Fork 37
/
graph.html
79 lines (77 loc) · 2.34 KB
/
graph.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
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SSR Performance Showdown</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #fff;
}
canvas {
background-color: #fff;
}
</style>
</head>
<body>
<canvas id="ssrPerformanceChart"></canvas>
<script>
const ctx = document.getElementById('ssrPerformanceChart').getContext('2d');
const chart = new Chart(ctx, {
type: 'bar',
data: {
labels: ['fastify-html', 'Vue', 'Svelte', 'Solid', 'Preact', 'React'],
datasets: [{
label: 'Requests per Second (rps)',
data: [1088, 1030, 968, 907, 717, 572],
backgroundColor: [
'#4b87b9', // fastify-html
'grey', // vue
'#4b87b9', // svelte
'grey', // solid
'#4b87b9', // preact
'grey' // react
],
borderWidth: 1,
}]
},
options: {
scales: {
y: {
beginAtZero: true,
ticks: {
color: 'black',
}
},
x: {
ticks: {
color: 'black',
font: {
size: 24
}
}
}
},
plugins: {
title: {
display: true,
text: 'SSR Performance Showdown',
color: 'black',
font: {
size: 30
}
},
legend: {
display: false
}
}
}
});
</script>
</body>
</html>