forked from declarationperfume/lichess-ratings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbullet-fide.html
51 lines (41 loc) · 812 Bytes
/
bullet-fide.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script>
</head>
<body>
<div id="chart" style="width:100vw;height:100vh;"></div>
</body>
<script type="text/javascript" src="ratings.js"></script>
<script>
let bullet = [];
let fide = [];
for (const el of ratings[0]) {
bullet.push(el[0]);
fide.push(el[1]);
}
chart = document.getElementById('chart');
const trace = {
x: bullet,
y: fide,
mode: 'markers',
type: 'scatter'
}
var layout = {
title: 'FIDE rating vs Lichess bullet rating',
xaxis: {
title: 'Lichess bullet Rating'
},
yaxis: {
title: 'FIDE rating'
}
};
Plotly.newPlot('chart', [trace], layout);
</script>
<style>
* {
margin: 0;
}
</style>
</html>